Sunteți pe pagina 1din 3

EAST CAROLINA UNIVERSITY Department of Economics Economics 6390 Research Some Eviews Notes for Assignment #3 Lets see

what needs to be done in order to produce the empirical results you will need. 1: Create a Workfile It would be useful to look up Workfile Basics in the HELP menu of EViews. An EViews Workfile is a file which stores all of the information (data, graphs, estimation results, etc.) that EViews needs/produces for your particular project. To get started you must first create a Workfile. To do this: 1. 2. Click the File button in the top-left corner of the EViews toolbar and click on New and then Workfile. At this point youll need to supply EViews with some information. In particular, you need to indicate: (a) the workfile frequency (for the housing starts data, the frequency is monthly). (b) the start date, i.e., the date of the initial observation. (for the housing starts data, the start date is 1946.01'). (c) the end date, i.e., the date of the last observation (for the housing starts data, the end date is 1994.11'). -Once youve supplied (a), (b), and (c), click OK. Now your workfile is created. 2: Save your Workfile Since things can go wrong at any time while working on your computer, it is crucial to remember to save your work at various points. I tend to be very risk averse in this matter and often save my files (in EViews, my word processor, etc.). It is very frustrating to work through a long session with the program and end up losing all of your results because of a failure to save your file. So, once youve created your workfile, I suggest that you immediately save it. Since, in the process of doing the work for this course, you will end up with a large number of EViews files, I strongly suggest that create a special directory/folder to store all of your EViews files (the raw data files, the workfiles, and anything else). For the purposes of this demonstration, lets assume that you have the EViews program files stored in the following directory: c:\eviews Then, I suggest that you create a folder/subdirectory on c:\eviews this directory to store everything. Lets assume you call this subdirectory data. In this case the path for the subdirectory would be: c:\eviews\data To make this your default directory (to which all saved items will be, bey default, saved), issue the following command: cd c:\eviews\data Then, assuming this subdirectory has been created and you have made it your default directory, you can now save your workfile into it by clicking File and Save and indicating the file type (the default will be workfile). Dr. Philip Rothman

3: Import the Data (Not Necessary if Data Have Been Supplied to You in an EViews Workfile) After you have created and saved your workfile, you need to: 1. Obtain the file with the data you need. You can download an ascii/text file with the housing starts data from the web page for this assignment. Note that the name of this file is hstarts.dat. Lets assume that youve stored a copy of this file in the following directory: c:\eviews\data 2. 3. Within EViews, click on File, then Import, and then Text-Lotus-Excel. This tells EViews that you want to read in data from either a text/ascii, Lotus, or Excel file. A window with the title Open will then appear. There are two things you need to do at this point: (a) Indicate where the file is located (c:\eviews.data for this example), click on the file, and then click OK. (b) EViews automatically recognizes with both .dat and .txt filename extensions as ascii/text files. So, at this point an Ascii Text Import window opens up. You now have to indicate: i. In the top-left window the Names of series or Number of series ... In hstarts.dat there is just one series and the first row of the file contains the name of the series. So, in this window you should enter the number 1'.

ii. Leave the Data Order button unchanged, since the data are ordered in Columns, which simply means that each row of the file contains an additional observation. iii. In the Sample to Import window enter, 1946:01 1994:11, so that the entire time series is read in. Note: to have this done automatically for you, to the right of this window click on Reset sample to: Workfile range button. iv. Then click OK. You are now ready to start analyzing the data. But before you move onto this step, I suggest that you once again save your workfile. 4: Estimate a Model with Seasonal Dummies The key thing you need to do is estimate the required OLS regressions. But before you do this you might want to see what the housing starts data look like. Actually, from Figure 6.4 of the text you already know what they look like. To see such a time series plot simply click on the variable called hstarts. This will open up a spreadsheet view of the data, which presents the data in separate cells as in, e.g., an Excel file. To see a time series plot, click View and then line graph. There are several other options on the View menu that you might want to check out. Next, lets see whats necessary in order to obtain the regression results reported in Table 6.1. There are three steps: 1. Create the seasonal dummy variables. This can be done with the EViews command @SEAS. For example, to create a dummy variable called d1that takes on the value 1 for all first month (i.e., January) observations, and 0 otherwise, issue the following command in the EViews command window: genr d1 = @seas(1) Note: its necessary to hit the Enter key to have EViews run this and any other command. Similarly, to

create a dummy variable called d2 that takes on the value 1 for all second month (i.e., February) observations and 0 otherwise, issue the following commands in the EViews command window: genr d2 = @seas(2) Using the @SEAS command you should be able to create all of the dummy variables you need for this homework assignment. 2. Set the current sample range to 1946:01 to 1993:12. This is necessary since the workfile sample range runs from 1946:01 to 1994:11. To do this enter the following on the EViews command window: smpl 1946:01 1993:12 3. Estimate the model by OLS. Two ways you can do this are: (a) From the EViews command window issue the following command: ls hstarts d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 The ls command instructs EViews to run an OLS regression. The first variable listed after ls is the dependent variable in the regression. All of the other variables listed are the independent variables in the regression. Note: in this regression we have excluded a constant term. Recalling the discussion on the bottom paragraph of p. 106 in the text, if we were to include a constant term, we would have to exclude one of the seasonal dummy variables. The system variable EViews uses for a regression constant term is called c. So, if you want to see what happens if all twelve seasonal dummies are included and a constant term is added to the model, issue the following command: ls hstarts c d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 You should get the Near singular matrix error message, which indicates that the specified model can not be estimated. This is what the author means when he writes, on p, 106, ... and your computer will scream at you if you run such a regression. To run a regression that would be satisfy the requirements of Problem #5 on p. 109, issue the following command: ls hstarts c d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 In this example a constant term has been added to the model and the d12 seasonal dummy variable has been dropped. (b) From the toolbar at the top of the main EViews window, click Quick and then Estimate Equation. This will open up an Equation Specification window in which you can list the variables to be used in the regression (the first variable name in the list must be the dependent variable) and indicate the sample range to be used. With the information given above you should be able to replicate the results reported in Table 6.1 and generate all of the regression results needed to analyze the all of the homework problems dealing with the housing starts data.

S-ar putea să vă placă și