Reading Data into Eviews

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

bakeraj2
Posts: 3
Joined: Thu Jul 08, 2010 5:33 pm

Reading Data into Eviews

Postby bakeraj2 » Thu Jul 08, 2010 5:57 pm

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.

startz
Non-normality and collinearity are NOT problems!
Posts: 3797
Joined: Wed Sep 17, 2008 2:25 pm

Reading Data into Eviews

Postby startz » Thu Jul 08, 2010 6:07 pm

By default, EViews uses the current workflow. So once the data is read in EViews will access the variables.

bakeraj2
Posts: 3
Joined: Thu Jul 08, 2010 5:33 pm

Re: Reading Data into Eviews

Postby bakeraj2 » Mon Jul 19, 2010 8:34 pm

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.

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: Reading Data into Eviews

Postby EViews Jason » Tue Jul 20, 2010 7:34 am

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

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 series02
or

Code: Select all

Read "E:/data.xls" 1 'series names are on line 1
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

Code: Select all

import "E:/data.xls"
If you wish create a new workfile based on your data file, use 'open'.

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

Postby EViews Glenn » Tue Jul 20, 2010 8:40 am

Jason meant "wfopen" not "open".

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: Reading Data into Eviews

Postby EViews Jason » Tue Jul 20, 2010 8:55 am

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.

bakeraj2
Posts: 3
Joined: Thu Jul 08, 2010 5:33 pm

Re: Reading Data into Eviews

Postby bakeraj2 » Tue Jul 20, 2010 11:53 am

Thanks very much.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests