Eviews homework

profileyenomrah
EviewsHandoutA.docx

4

Macro-Econometrics

Eviews Handout A

This handout provides a brief introduction to estimating ARMA models in Eviews. This handout is not meant to be a complete description of this topic. For a more detailed discussion see the appropriate sections in the Eviews manual, available under the Help tab within Eviews.

Creating an Eviews workfile

In order to analyze data and run regressions in Eviews, you need to get your initial data into an Eviews workfile. If your data observations are associated with dates – daily, monthly, quarterly, or annual, you can set up the workfile so that Eviews keeps track of dates for you.

For example, suppose we have annual data from 1950 to 2005. Click on File => New => Workfile, and a window will open up, asking you to define the characteristics of the workfile. You can also give the new workfile a name, such as Project 1. Filling in the window as below will set up the appropriate workfile:

In some cases, the data observations are merely ordered from 1 to N. In that case, set the Frequency to “Integer Date” and enter “1” as the start date, and N as the end date.

Eviews automatically creates two variables for the new workfile – c (a time series with 1s in every observation cell) and resid (a time series that will be filled with residuals once you run a regression. Here is what your workfile should look like at this point:

Adding variables to the Eviews workfile

Typically, Eviews users store their data in Excel. One straightforward way of creating an Eviews variable is to “cut and paste” the data from Excel. Suppose that you have created log real U.S. GDP in Excel, and you want to put this data in a variable called lgdp. The first step is create the space for the data in Eviews. To create a new series, click on Object => New Object => Series. Type in the series name (e.g., lgdp) in the box under “Name for Series” and click on OK. As you can see from the screen on the next page, Eviews has now created a space for your new time-series variable.

Now, double click on the variable lrgdp, and click on the Edit+/- button. You can now cut-and-paste the data from Excel into the cells provided by Eviews. Close the window when you are done.

Save your workfile periodically so that you don’t lose your work!

You can also create new variables using variables already in your workfile. For example, suppose that you want to create a new variable dlrgdp, which is equal to 100*[ lrgdp(t) – lrgdp(t-1) ]. Click on the “Genr” button and create your new variable in the window provided using an equation:

dlrgdp = 100*( lrgdp – lrgdp(-1) )

Note how Eviews treats current and lagged variables. Once you click OK, the new series has been generated.

Using the ACF and the PACF features

Suppose that there is a variable called dlrgdp in your Eviews workfile, and you want to examine the autocorrelation properties using the ACF and the PACF tools. Double-click on the variable, which opens up a window with the data. Click on View => Correlegram. Accept the defaults – looking at the variable in levels and showing 36 lags for each function – by clicking on OK. The results are shown on the following page.

Note that the ACF and PACF have the same distribution, and the Q-stats p-values are shown for each set of lags. In addition, there is a graph, which gives you a quick view of the lag structure, and the dashed lines indicate the range of significance (if the bar is outside the dashed lines, the correlation is significantly different from zero.

Estimating an ARMA(p,q)

Notice the “Quick” at the top of the Eviews workfile. You can estimate a simple ARMA model by clicking on Quick => Estimate Equation. Type in the desired features of the ARMA model and hit OK. Here are some examples:

dlrgdp c ar(1) [AR (1) model with constant]

dlrgdp c ar(1) ar(2) [AR (2) model with constant]

dlrgdp c ma(1) [MA(1) model with constant]

dlrgdp c ar(1) ma(1) [ARMA(1,1) model with constant]

dlrgdp c ar(1) ma(1) ma(4) [ARMA(1,(1,4)) model with constant]

Once you hit OK, the regression results will appear in a new window.