Data Ferret

For making suggestions and/or requests for new features you'd like added to EViews.

Moderators: EViews Gareth, EViews Moderator

Thommo
Posts: 14
Joined: Wed Sep 17, 2008 10:56 am

Data Ferret

Postby Thommo » Wed Nov 26, 2008 10:58 am

I’d like to suggest that you look into supporting data acquisition from DataFerret. This is the central point for getting most government micro data (census etc.) Right now the site provides ascii files plus program files for SAS and Stata. This makes it very easy to read data into the competition, but doesn’t leave a way to get data into EViews unless you also use one of the others. (Actually, the Stata support requires the user to know enough Stata to edit do files.)

It would be very valuable to be able to get either *.wf1 or ascii plus *.prg files.

EViews Chris
EViews Developer
Posts: 161
Joined: Wed Sep 17, 2008 10:39 am

Re: Data Ferret

Postby EViews Chris » Wed Nov 26, 2008 11:27 am

EViews can understand many simple SAS program files that read ascii data, so you can already use Data Ferrett with EViews by selecting "SAS (Version 8.0 or higher)" as the file format in the Download Data dialog of Data Ferret.

This will give you two files for downloading: a file with the extension '.sas' and a file with the extension '.asc'.

Place these two files in the same directory (it doesn't matter where) and then open the '.sas' file within EViews (for example, by using drag and drop from Windows).

EViews should handle the rest.

We recently made a few tweaks to things to improve compatibility with the '.sas' files written by Data Ferrett, so you should probably download the latest EViews 6 patch (Nov 26 2008 or later) before trying this.

If things don't work smoothly it is normally just a matter of commenting out the offending part of the SAS program file (by surrounding the line with /* */) and trying again. Feel free to send us any examples of problems like this (by email to support@eviews.com) and we'll see what we can do to make it work automatically.

gcg
Posts: 11
Joined: Wed Oct 29, 2008 9:18 pm

Re: Data Ferret

Postby gcg » Fri Dec 05, 2008 6:10 pm

Hi,

Will this work with data from the SDA Archive as well? Downloading it in the SAS file format?

Thank you.

EViews Chris
EViews Developer
Posts: 161
Joined: Wed Sep 17, 2008 10:39 am

Re: Data Ferret

Postby EViews Chris » Mon Dec 08, 2008 1:56 pm

The answer is 'sort of'.

I've never used the SDA Archive before, but here is what happened when I tried to download the dataset at http://sda.berkeley.edu/cgi-bin/hsda?harcsda+calabor.

I first saved the data file "caldata.txt" into a local directory. I then saved the SAS definition file 'calsas.txt' into the same directory.

I renamed the file 'calsas.txt' to 'calsas.sas' so that EViews would recognize it as a SAS program file.

I then drag and dropped my new 'calsas.sas' file onto EViews repeatedly while editing my way around problems using a text editor. Here is what happened:

1) EViews errored with the message "Statement 'TITLE' is not currently supported". I fixed this by commenting out the line:

Code: Select all

/*TITLE "2001-2002 California Workforce Survey";*/

2) EViews errored with the message "Proc format option 'LIB' is currently not supported". I fixed this by commenting out the 'LIB' option as follows:

Code: Select all

PROC  FORMAT /*LIB=LIBRARY*/;

3) EViews errored with the not particularly useful message "Syntax error: found '(' when expecting ';' ". I fixed this by modifying the line:

Code: Select all

DATA IN /*(LABEL="2001-2002 California Workforce Survey")*/;

4) EViews errored with the message "Statement 'IF' is currently not supported. I fixed this by commenting out the block of lines

Code: Select all

/*IF (age = 99) THEN age = .;
IF (gender = 9) THEN gender = .;
IF (hh18 = 99) THEN hh18 = .;
...


5) EViews errored with the message "Proc Datasets is currently not supported". I fixed this by commenting out the block of lines:

Code: Select all

/*PROC DATASETS;
  CONTENTS DATA=IN POSITION;
  TITLE 'CONTENTS OF ALL VARIABLES';
RUN;*/

6) EViews reported "Access denied to file 'C:\Users\Chris\Deocuments\SDA\ ' by operating system". I fixed this by specifying the correct filename in the FILENAME statement (note that this step would also have to have been done if you were using SAS itself).

Code: Select all

FILENAME INDATA "caldata.txt";      /* Put name of data file between quotes*/


FInally, I dropped in the file one more time and it read everything in.

I have to admit that step 3) was fairly cryptic, but otherwise, it was largely just a matter of commenting out whatever EViews reported that it didn't support.

My guess is that all files from the same site would probably require pretty much the same edits, so if you did this repeatedly it would become fairly straightforward.

Still, it's clearly not as clean as reading datasets from Data Ferret. As I mentioned, I was unaware of the SDA archive before you mentioned it. If enough users are interested in working with it, we might be able to put in some tweaks to make things a bit easier.


Return to “Suggestions and Requests”

Who is online

Users browsing this forum: No registered users and 15 guests