Write command and dateid
Posted: Tue Jul 30, 2013 9:33 am
Hi, this is a really tiny bug, but thought I would post it.
When using a balanced pannel workfile with integer dates (EViews 8, 32 bit), I can write to a csv using a command like this:
write(t=txt,na="",d=c,dates) “C:\My_CSV.csv” Var1 Var2 Var3
However, this doesn't give me a CSV with 4 "columns" - the date and the three variables. Ideally, I would like the first "column" to be the cross section, then the date, then the variables, i.e exactly the format you get if you used the write command from a pool object with cross section identifiers in a time seires file. (I can't find an option to do this with the workfile write command, apologies if there is a simple one I have missed).
My solution was to try:
write(t=txt,na="",d=c,nodates) “C:\My_CSV.csv” Crossid Dateid Var1 Var2 Var3
However, the dateid doesn't come out as expected, I get a lot of numbers slightly higher than -1 (to 4dps). My work around is to use:
series trend=@trend+1
write(t=txt,na="",d=c,nodates) “C:\My_CSV.csv” Crossid trend Var1 Var2 Var3
And this works fine, gives exactly the same format as with the Pool write function. So it is hardly a huge problem but thought I would report nonetheless incase others have similar problems trying to get a harmonised output across the two different formats for time-series/cross-section data.
When using a balanced pannel workfile with integer dates (EViews 8, 32 bit), I can write to a csv using a command like this:
write(t=txt,na="",d=c,dates) “C:\My_CSV.csv” Var1 Var2 Var3
However, this doesn't give me a CSV with 4 "columns" - the date and the three variables. Ideally, I would like the first "column" to be the cross section, then the date, then the variables, i.e exactly the format you get if you used the write command from a pool object with cross section identifiers in a time seires file. (I can't find an option to do this with the workfile write command, apologies if there is a simple one I have missed).
My solution was to try:
write(t=txt,na="",d=c,nodates) “C:\My_CSV.csv” Crossid Dateid Var1 Var2 Var3
However, the dateid doesn't come out as expected, I get a lot of numbers slightly higher than -1 (to 4dps). My work around is to use:
series trend=@trend+1
write(t=txt,na="",d=c,nodates) “C:\My_CSV.csv” Crossid trend Var1 Var2 Var3
And this works fine, gives exactly the same format as with the Pool write function. So it is hardly a huge problem but thought I would report nonetheless incase others have similar problems trying to get a harmonised output across the two different formats for time-series/cross-section data.