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.
Gregory
Posts: 20
Joined: Mon Nov 13, 2006 8:05 am

Is There a Better Way to Save Series?

Unread post by Gregory »

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)
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Unread post by TomDoan »

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
Gregory
Posts: 20
Joined: Mon Nov 13, 2006 8:05 am

Unread post by Gregory »

Thank you. I'll give it a shot.
"You sound pretty good, kid, but can your mom recognize you on the radio?"
- Les Paul
Post Reply