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.
Write command and dateid
Moderators: EViews Gareth, EViews Moderator
-
- Posts: 13
- Joined: Wed Apr 10, 2013 8:56 am
- Location: London, UK
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13318
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Write command and dateid
There's really no reason to be using the write command in EViews 8. You should be using wfsave instead.
Follow us on Twitter @IHSEViews
-
- Posts: 13
- Joined: Wed Apr 10, 2013 8:56 am
- Location: London, UK
Re: Write command and dateid
Thanks for this suggestion (I'm revisiting coding in EViews after not having done much since EViews 6 so not terribly familiar with the version changes).
However, the dateid series still does not export correctly. For a balanced pannel with integer dates, the dateid series correctly goes through 1, 2, 3, 4 etc and then repeats for the next cross section. When exported afterwards using wfsave it still has -1 in every field, as with the write command.
However, the dateid series still does not export correctly. For a balanced pannel with integer dates, the dateid series correctly goes through 1, 2, 3, 4 etc and then repeats for the next cross section. When exported afterwards using wfsave it still has -1 in every field, as with the write command.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13318
- Joined: Tue Sep 16, 2008 5:38 pm
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13318
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Write command and dateid
Might take us a while to fix this one. Best bet in the mean time is to create your own id:
Code: Select all
create u 1 100 10
series myid = @cellid
wfsave(t=excel) c:\temp\myfile.xls @drop dateid
Follow us on Twitter @IHSEViews
-
- Posts: 13
- Joined: Wed Apr 10, 2013 8:56 am
- Location: London, UK
Re: Write command and dateid
Hi - thanks for the work around. Like I say it is a really tiny bug, hardly a huge problem but thought I would post it nonetheless.
The value for me in it is that, if fixed, it is easy to get an identical output of data, whether you are using a pooled model with series that have cross sectional identifiers, or using the pannel workfile format. Of course, the work around is not massively arduous!
The value for me in it is that, if fixed, it is easy to get an identical output of data, whether you are using a pooled model with series that have cross sectional identifiers, or using the pannel workfile format. Of course, the work around is not massively arduous!
Who is online
Users browsing this forum: No registered users and 45 guests