Escolar Documentos
Profissional Documentos
Cultura Documentos
22.02.2007/01.03.2007
In this classes we will learn about some basic features of Eviews. This
classes are meant to be just introduction to Eviews, not a full description of
the program. Data for the classes are on the web pages www.wne.uw.edu.pl/
~krosiak and www.wne.uw.edu.pl/~pwojcik and in EViews installation directory (U:/Program Files/Eviews/Example Files/Data). You should copy the
following files: demo.wf1, demo.xls and macromod.wf1 into chosen folder. Data
description of DEMO workfile: M1 money supply, GDPgross domestic product, RS short term interest rate, PRprice level
1.1
If you saved the above mentioned workfiles, you can easily open them by File/Open/Eviews
workfile (ctrl+O command) desired file: demo.wf1
1.1.2
You may drag-and-drop the file onto the Eviews icon or click on File/Open/Eviews
workfile... Files of types: Excel desired file: demo.xls
Macroeconometrics 2007
Eviews opens the Excel Read wizard. There are two steps, generally you can
choose default settings. If preview window does not correctly display your data,
then choose other options available on the second page of wizard.
When you click Finish, eviews will create a new workfile, displaying the group
of variables imported from Excel file. You may check them, compare with the
original Exel file and create a group of those variables. To do this, click on Name,
give some name of the group and accept by clicking OK.
Now, to work further with the workfile, you should save it. Do it now.
1.1.3
Macroeconometrics 2007
Click on File/New/Workfile and fill in the Workfile structure type dialog box
and the Date specification (for example, choose Dated-regular frequency and Frequency: Quarterly). Then you have to specify first and last date in your sample
(choose 1952:1 and 1996:4 respectively). Click OK.
Notice:
1.
The workfile window displays two pairs of dates: one of the range of dates contained in
the workfile, and the second for the current workfile sample.
2.
The workfile contains the coefficient vector C and the series RESID. All Eviews workfiles
will contain these two objects.
Now, you may create new objects by clicking right mouse button and choosing
New Object... You will see the main object types available in Eviews. You will
learn about them in more details later. You may also import Excel-file: click on
Proc/Import/Text-Lotus-Excel..., locate the demo.xls and double click on the file
name. Fill in the new dialog box (see below) and click OK.
1.2
To open the default spreadsheet view of the series, simply double click one of the
series. You can now use several entries of the View and Proc menus to analyse
Macroeconometrics 2007
several characteristics of the series. Explore the contents of the View and Proc
menus in the chosen series window. Try for example the following commands:
View/Descriptive statistics/Stats Table...
View/Graph/Line...
...
Task : Anwser the question, whether according to Jarque-Bera test is GDP
normally distributed?
You can create new series, which is the function of the existing series. For
example, let us create natural logarithm of GDP series. To do this write in the
command line:
genr log gdp=log(gdp)
Now you can work with that new series. Try the further commands from the
View and Proc menus, for example:
View/Descriptive statistics/Histogram and Stats...
View/Distribution/Empirical Distribution Tests...
...
Task : Show the correlogram of the natural logarithm of GDP.
You can create group of new series without creating new series in the workfile.
For example to create group that contains natural logarithms of the series M1
and GDP, the level of RS and first difference of natural logarithm of PR, write
in the command line:
show log(m1) log(gdp) rs dlog(pr)
Now you can work with the group similar as with the single series. Note
that the entries for group object differ from those for a series object. Try to plot
the group: View/Graphs/Line... or display table of descriptive statistics for each
of the series in the group: View/Descriptive Stats/Individual Samples... Explore
other entries.
Task : Show the correlation matrix of the series in the group.
1.3
Macroeconometrics 2007
Regression estimation
We will estimate the following model for M1, using data over the period from
1952Q1-1992Q4
log(M 1t ) = 0 + 1 log(GDPt ) + 2 RSt + 3 log(P Rt ) + t .
(1)
1.4
Hypotheses testing
You can now easily perform several hypotheses using the estimated equation.
Wald test View/Coefficient test/Waldcoefficient Restrictions... and enter the
restriction (example C(2)=1)
Note: Coefficients are assigned in the order that the variables appear in the
specification, for example coefficient for PR term is labeled C(4).
Macroeconometrics 2007
1.5
Equation modification
The tests results suggest that you should modify the equation to take into
account the serial correlation. To edit the specification click Estimate.
Adding new variables
Task : Basing on Akaike and Schwarz information criteria, compare the two
models and choose better one.
1.6
Macroeconometrics 2007
Forecasting
System estimation
Now open the workfile named CS.wf1. To display data description click on
Details+/.
2.1
System specification
Macroeconometrics 2007
2.2
System estimation
Once you created and specified your system of equations, you can estimate it,
simply by clicking on Estimate button. In the System Estimation dialog box you
should select Method of estimation and Sample.
2.3
Macroeconometrics 2007
View Generally system view is similar to view of single equation object. You
may, for example, perform hypothesis tests on the coefficients, display graph of
residuals, graph endogenous variables etc.
Task : Perform Wald test to check if GDP coefficients are equal in both
equations.
Procs Task : Create a new group containing the two series of residuals from
the system of equations. Check for cross correlations in the residuals.
Models
3.1
Model specification
Having estimated the equations, you can easily create model. Select Object/New
Object.../Model enter the name of the model and click OK to save it. To add
stochastic equations to the model, simply copy and paste them. Select the equations in the workfile window, then ctrl+c, click anywhere in the model object
window and use ctrl+v. Double clicking on any equation will bring up a dialog
box of properties of that equation. The equations are inserted as links. That
means if you reestimate any eqaution, you should update the equations in the
model by using Proc/Links/Update All Links-Recompile model.
To add the identity, click the right mouse botton anywhere in the model
window and select Insert... In the displayed dialog box simply type the identity:
3.2
Macroeconometrics 2007
Model solving
To solve the model click on Solve in the model window. There is many options
available from the dialog box, but now you should use the basic settings. Set
the sample to 1960q1 to 1999q4 and use default options. Click OK to start
calculations.
View Select View/Variables to display variables from the model. The lines
contain the icons indicating the variable type, the name of the variable, the
associated equation and the description of the variable.
Procs For example, to display on the line graph actual and fitted values of
endogenous variables in the model, simply select the four variables (by holding
down the control key and clicking on he variable names), then select Procs/Make
Graph... In the dialog box check Actuals and set the Sample for graph to 1960q1
to 1999q4 and click OK.
Task : Save the graph.
3.3
Specifying scenarios
The last exercise today is to examine how the model bahaves under some assumptions with respect to the exogenous variables. EViews provides a simply
tool to carry out such an exercise. Using View/Scenarios... you can override a
subset of the exogenous variables in a model to give them new values, while
using the values stored in the actual series for the remaider of the variables.
To add new scenario, click on Create New Scenario botton.
Once you have created the scenario, you can modify the scenario from the
baseline case by overriding one of your exogenous variables. To do this, return
to the variable window of the model, click on the variable M, use the right
mouse button to call up the Properties dialog box for the variable, and then in
the Scenario box, click on the checkbox for Use override series in scenario. A
message will appear asking if you would like to create the new series.
10
Macroeconometrics 2007
Click on Yes to create the series, then OK to return to the variable window.
In the variable window, the variable name M should now appear in red,
indicating that it has been overridden in the active scenario. This means that
the variable M will now be bound to the series M 2 instead of the series M when
solving the model.
To contract the money supply over the period 1990q1 to 1999q4, you can
simply use the following lines of commands:
smpl 1990q1 1999q4
m 2=500
smpl @all
Task : Solve the scenario 2 of the model.
Once the solution is complete, you can compare the results obtained for
unrestricted and restricted money supply. Go back to variable view, check the
exogenous variables and use Proc/Make Graph... to display the results. Check
both the Active and Compare solution checkboxes, making sure that the active
scenario is set to Scenario 2, and the comparison scenario is set to Baseline. Set
the sample to 1980Q1 to 1999Q4.
Task : According to the model, how the cut in money supply affects the interest rates, invetment, income and consumption?
PLEASE, LEARN MORE ABOUT THE ABOVE MENTIONED TOPICS
READING CHAPTERS 2, 23 AND 26 OF Eviews 5 Users Guide.
11