Is There a Better Way to Save Series?

Use this forum to post questions about syntax problems or general programming issues. Questions on implementing a particular aspect of econometrics should go in "Econometrics Issues" below.

Is There a Better Way to Save Series?

Postby Gregory » Wed Aug 06, 2008 4:34 pm

The variable coeffs is of type vector[series]. Is there a more elegant way to dump it to a file without having to write out coeffs(1), coeffs(2), and so on?


open copy "myFilePath/myFileName.xls"
copy(org=columns,format=xls) gEnd+1 lastObs $
coeffs(1) coeffs(2) coeffs(3) coeffs(4) coeffs(5) $
coeffs(6) coeffs(7) coeffs(8) coeffs(9) coeffs(10) $
coeffs(11) coeffs(12) coeffs(13) coeffs(14) coeffs(15) $
coeffs(16) coeffs(17) coeffs(18) coeffs(19) coeffs(20) $
coeffs(21) coeffs(22) coeffs(23) coeffs(24) coeffs(25)
Gregory
 
Posts: 20
Joined: Mon Nov 13, 2006 9:05 am
Location: Montreal

Postby TomDoan » Thu Aug 07, 2008 4:31 pm

The variable coeffs is of type vector[series]. Is there a more elegant way to dump it to a file without having to write out coeffs(1), coeffs(2), and so on?


Code: Select all
open copy "myFilePath/myFileName.xls"
copy(org=columns,format=xls) gEnd+1 lastObs $
coeffs(1) coeffs(2) coeffs(3) coeffs(4) coeffs(5) $
coeffs(6) coeffs(7) coeffs( coeffs(9) coeffs(10) $
coeffs(11) coeffs(12) coeffs(13) coeffs(14) coeffs(15) $
coeffs(16) coeffs(17) coeffs(1 coeffs(19) coeffs(20) $
coeffs(21) coeffs(22) coeffs(23) coeffs(24) coeffs(25)


Assuming that you're dumping the full coeffs, you can just do

Code: Select all
open copy "myFilePath/myFileName.xls"
copy(org=columns,format=xls) gEnd+1 lastObs coeffs
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Postby Gregory » Fri Aug 08, 2008 8:49 am

Thank you. I'll give it a shot.
"You sound pretty good, kid, but can your mom recognize you on the radio?"
- Les Paul
Gregory
 
Posts: 20
Joined: Mon Nov 13, 2006 9:05 am
Location: Montreal


Return to Help With Programming

Who is online

Users browsing this forum: No registered users and 1 guest