45-734 Probability and Statistics II (4th Mini AY 1997-98 Flex-Mode and Flex-Time)
These notes are written to help you learn the basics of EVIEWS. The first section is concerned with the first homework assignment and the second section lists some frequently used EVIEWS commands that you will encounter during the course.
First Homework Assignment
Part 1: Military Mobilization Data
First, you will need to obtain the data that you will be using. These data can be downloaded from each problem set. Each data set is stored with a WF1 suffix. Hence, if you want to copy the data for the military mobilization assignment, you should copy MILITARY.WF1. You will probably find it useful to keep a separate diskette for this course. We will be adding additional items as we go along.
In these notes, the commands that you are to issue will be listed in capital letters at the left margin. EVIEWS sometimes asks you questions. In these notes, responses that you are to give to such questions will not be preceded by a prompt. Your responses should always be followed either by a return or clicking on the appropriate option.
After EVIEWS comes up, across the top of the screen will be the menu bar in a standard WINDOWS type layout. Click on the file menu and choose "open". Pick the appropriate drive and directory (e.g., A: if you leave your WF1 file on the root directory of a floppy). After the file loads a window will come up with its own menu bar and the window will contain a list of the variables in the data file. You should see GNP, YEAR, MILMOB, and RESID (resid will always appear regardless of the data set). The cursor will be flashing in a space below the main menu bar. You can issue commands by simply typing them in and hitting the enter key.
GNP, YEAR, and MILMOB are the labels of the variables. YEAR contains the entries 1915 to 1988; GNP is the change in GNP from year t-1 to year t; and MILMOB is the change in the fraction of the U.S. population in the military.
To have the data series listed on the screen, issue the command:
SHOW YEAR GNP MILMOB
Another window will appear with the three variables displayed as columns. After looking at the data, close the window but do not bother to save it.
Plot GNP against year to see how it looks. Issue the command:
SCAT GNP YEAR
The scatter plot window offers you some choices on the menu bar including printing out the scatter plot, adding labels, zooming, and so on. The two right-most options are sometimes hard to see so you have to expand the window to the right to see the buttons. These two buttons are PrintSetup and Options. The Options window offers you a wide range of controls over the plot including an option to immediately fit a regression line through the points.
To generate a histogram for GNP, issue:
Once again you will see a menu bar with a number of options including one to print out the histogram. This windown also contains the basic statistics for the variable: mean, median, standard deviation, and so on.
You can obtain summary information about means, standard deviations, and correlations of an arbitrary number of data series. Issue:
STATS GNP MILMOB
To see the correlations issue the command:
COR GNP MILMOB
The menu bar in the correlation window has a Stats button. Clicking the button displays the same information as issuing the STATS command.
For assignment 1 you first want to regress GNP on a constant and MILMOB. The constant is built into EVIEWS and is named C (it is a reserved word so you cannot use C for anything else or EVIEWS will complain). To run the regression you use the command LS which, naturally enough, stands for "Least Squares". That is:
LS GNP C MILMOB
The results should come up very quickly in a window with a menu bar across the top. You can click on "print" to print the regression results. Clicking on "resids" shows you a plot of the residuals. If you want to use the residuals for something, they are stored in resid until you run another regression. If you want to keep them longer, you can generate a new series of your own. Hence, you might issue:
This stores the residuals in a series called GNPRES. Graph the residuals against YEAR and note pattern. Namely:
SCAT GNPRES YEAR
To run a separate regression just on the time period 1915 - 1945 you can change the sample range by using the SMPL command. That is:
SMPL 1915 1945
which selects the first 31 observations. You can run the regression as described above.
To end the session click on the file menu and choose exit. A dialog box will come up warning you that your workfile (military.wf1) has been changed. Click on "yes" to save the changed file and you will then exit EVIEWS.
Part 3: Problem 11.3 MWSTo get the data into EVIEWS, first issue the command:
Useful EVIEWS Commands