I know this is a juvenile question, but I have used eviews only a few times awhile ago. I just purchased eviews 7.1, and I know how to load foreign data (say from excel) as a workfile. What I want to know is if I can write a program that will make use of the variables in that workfile.
Alternatively I would also like to know how to read in the foreign data directly into the program. I keep getting errors when I specify the data path.
Any help is much appreciated.
Reading Data into Eviews
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Reading Data into Eviews
By default, EViews uses the current workflow. So once the data is read in EViews will access the variables.
Re: Reading Data into Eviews
Ok, I recall that variables appeared in the workfile when I used eviews in the past reading data in. The problem I have now is that I cannot seem to read the data into the program.
For example, my data is in an excel file I made on an external hard-drive.
So,
Read E:/ data.xls
I get the error that no file by that name is found, or a broken network.
For example, my data is in an excel file I made on an external hard-drive.
So,
Read E:/ data.xls
I get the error that no file by that name is found, or a broken network.
-
EViews Jason
- EViews Developer
- Posts: 870
- Joined: Tue Sep 16, 2008 3:50 pm
Re: Reading Data into Eviews
There are 2 things wrong with your command. First is you have a space in between / and data.xls. It also wouldnt be a bad idea to put your entire path in quotes for directory or files names that contain spaces. So
The second thing is you are missing either the series names to import or the line number where the series names can be found.
or
Please note however the read command is an older EViews command. You may find the 'import' or 'open' commands more suitable. Use the import command if you wish to import data into an already existing workfile. The import command is much better at auto-detecting series information such as the names as well as match merge reads, sequential reads, dated reads and appends. The following command is acceptable
If you wish create a new workfile based on your data file, use 'open'.
Code: Select all
Read "E:/data.xls"The second thing is you are missing either the series names to import or the line number where the series names can be found.
Code: Select all
Read "E:/data.xls" series01 series02Code: Select all
Read "E:/data.xls" 1 'series names are on line 1Code: Select all
import "E:/data.xls"Code: Select all
open "E:/data.xls"-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Reading Data into Eviews
Jason meant "wfopen" not "open".
-
EViews Jason
- EViews Developer
- Posts: 870
- Joined: Tue Sep 16, 2008 3:50 pm
Re: Reading Data into Eviews
You can use either, but Glenn is correct in that you should use 'wfopen'. 'Open' is also an older command that has been left in EViews for backward compatibility reasons. In simpler cases the results should be same, but 'wfopen' is the preferred method.
Re: Reading Data into Eviews
Thanks very much.
Who is online
Users browsing this forum: No registered users and 2 guests
