Prof. Bryan Caplan

bcaplan@gmu.edu

http://www.gmu.edu/departments/economics/bcaplan

Spring 1999

Introduction to Eviews

  1. Getting Started
    1. Installation instructions come with the software; nothing surprising here.
    2. To practice, go to the class homepage and click on the Eviews "hw1" file, named hw1.bin.
    3. Choose the option "Save."
    4. Once you have the file on your hard drive or floppy disk, rename it hw1.wf1.
  2. Opening An Eviews Worksheet
    1. Open the Eviews program (you may want to add the Eviews icon to your toolbar for convenience).
    2. Once Eviews is open, click on File.
    3. Then go down to Open, and click the option Worksheet.
    4. Locate your saved file hw1.wf1 and double-click it.
    5. Your first worksheet is now open, and you are ready to try a few basic commands.
    6. There are two ways to use Eviews:
      1. Command-driven
      2. Menu-driven
  3. Some Easy Eviews Commands
    1. The menu-driven features of Eviews build on the underlying language of TSP. You can also access this language directly in the upper command window; as you get more advanced, you make find it convenient to "mix and match" writing commands and using the menu.
    2. Creating matrices:
      1. To create a 3x10 matrix of all 0's xdata, type: matrix (3,10) xdata
      2. To assign non-0 values to one cell (1,1) of this matrix, type: xdata(1,1)=3, etc.
      3. To assign non-0 values to all cells, create a matrix x, then type: x.fill a,b,c,d,.... For example, if you do matrix (2,2) x, and then type: x.fill 1,2,3,4, this produces the matrix x=
      .
    3. Matrix arithmetic:
      1. To add together two matrices, x and y, create a third matrix equal to x+y, type: matrix z=x+y
      2. To multiply two matrices, type: matrix z=x*y
      3. To invert x, type: matrix z=@inverse(x)
      4. To calculate the covariance or correlation between two vectors (or between the columns of a matrix), type: matrix z=@cov(x,y) or matrix z=@cor(x,y). (Note that Eviews will only let you calculate these statistics if the number of rows matches the number of observations for that worksheet).
    4. See your results: Click on the newly-appearing objects in the lower window!
    5. For more commands, see hand-out.
  4. Some Easy Eviews Actions (Menu-driven)
    1. Many functions are easier to perform using the menus rather than commands. Each "Object" in Eviews appears in the lower window. Double-clicking on the objects shows what each object is.
    2. First, look at the variables inf (Inflation) and un (Unemployment) by double-clicking their icons. You should see a series of 35 variables, running from 1961-1995.
    3. For each variable, go to View.
    4. Under the View heading, click on the option "Line Graph."
    5. Again under the View heading, click on the option "Descriptive Statistics." Select the sub-option "Histogram and Stats."
    6. To do a simple regression: Click on "Objects" and select "Equation." Type your dependent variable first, followed by the list of independent variables separated by spaces. Use the letter c for the constant.
  5. A Slightly More Difficult Action in Eviews (Menu-driven)
    1. Simultaneously select both inf and un. You do this by first clicking one; then, press and hold the button Crtl while you click the second variable. (If you did this correctly, both variables will be shaded now).
    2. Go to the View heading and choose the option "Open Selected," with the sub-option "One Window."
    3. Several new choices will now appear before you. Choose the option "Open Group."
    4. Name your new group, and close it.
    5. There will now be a new icon in your worksheet. Re-open it.
    6. Try out the following options under the View heading:
      1. Multiple Graphs... Bar
      2. Correlations
      3. Covariances
      4. To learn more: Play around some more with Eviews and see what you can learn. With computing, everything falls into place with practice.