EViews Tutorial

advertisement
Eviews Tutorial
for Economic Forecasting
Lei Lei
Getting Started
 Open
Eviews window
 Create a workfile
 Import data
 Edit and Save data
 View and plot data
 View summary statistics
 Generate new variables
 Run simple regression
1.Open Eviews window-1

Click on the Eviews icon-Main Eviews
window:
 title bar: at the top, inlcluding menus such as
“File”, ”Edit”, etc.
 command window: immediately below the title
bar. You can execute commands either by clicking
on command buttons or by typing equivalent
command into the command window.
1.Open Eviews window-2
Status line:
At the bottom, providing additional information
on the status of various settings of the
program.
Work area:
Between the command window and the status
line, where the results of operations will be
displayed.
2.Create a Workfile-1

Click on the File menu, then on New, and on
Workfile - the most important object container
in Eviews, which can be used to store data


In the window appeared:



Choose the type of your data. For example, you can
select “Dated-regular frequency” for time-series data
Input the start and end dates of your data
Name the workfile (optional
Click OK.
2.Create a Workfile-2
 The
workfile now contains two
entries:
c – constant, where Eviews saves the
intercept of the regression
resid – residuals, where Eviews saves the
residuals of last regression
3.Import data-1

Import from excel file:
 Open the file, make sure the observations for different
variables are arranged in columns, with names on top.
Copy the names of the variables, and remember the
Upper left data cell (location of first data, i.e., A2), then
close the spreadsheet.
 In main Eviews window, after creating the workfile, click
File, then Read Text-Lotus-Excel, and specify the
location of data file.
 In the opened dialog box, fill in the Upper left data cell,
then past the names of the variables, click OK.
3.Import data-2
 Enter
data manually:
 click on Quick in the title bar, and then
on Empty Group (Edit Series).
Next enter the variables, starting with the
name, in the grey box to the immediate
right of “obs.”
3.Import data-3
 Import
ASCII data form a textfile:
Make sure the observations for different
variables are arranged in columns, with names
on top.
In the Eviews workfile window, click Procs, and
Read Text-Lotus-Excel, then browse for
location the text file.
In the dialog box, select from a range of input
options.
4.Edit and Save data-1
 Edit
data:
click the Edit+/- button on the workfile
toolbar, move to the observation in question,
enter the correct value, and press Enter.
 Paste
data into word file: click freeze, then
you can copy and past.
 Print
data: click Print button.
4.Edit and Save data-2
 Save
data:
 Save an entire workfile: click Save in the workfile
toolbar, or click on File and then SaveAs in the
main menu.
 Store individual series: clcik Store in the workfile
toolbar. If you need to retrieve the series, you can
simply click on Fetch in the workfile toolbar.
5. View and plot data-1
 View
data
One variable – double click on variable in
workfile window, click on view, then
spreadsheet; or simply click on Sheet
Multiple variables – in workfile window, select
the name of variables needed, right click and
choose “open group view/spreadsheet”
5. View and plot data-2
 Plot
data
One variable – double clicking on the name of
the variable, then click on View /Graph/Line in
the resulting series window.
Multiple variables – open the variables as a
group, then click View /Multiple Graph/Line.
Edit: double click on the graph or click on
Options button to edit.
6.View summary statistics
 One
variable
Click the View button at the upper-left corner of
the workfile, then click on Descriptive
Statistics, and Histogram and Stats

Multiple variables
 First open the variables as a group
 View Descriptive Statistics in the group
 View correlations
7. Generate new variables
In the workfile window, click Genr button, then
specify the new variable using equation formula.
 Alternatively, in the command line, use command
“genr” to generate new variables. For example,
natural logs: genr lqvetts=log(qvetts)
genr unemplsq=unemployment*unemployment
lagged variable: genr lprice=price(-1)

8.Run simple regression-1
 In
main Eviews window, click Quick, then
Estimate Equation. Alternatively, in Workfile
window, click Object, and New Object, then
click Equation.
 Equation Speciation: write down the equation,
then choose the method (usually least
squares) and sample period.
8.Run simple regression-2
 Saving
 Note:
equation: using Name Option
If run linear regression, you may just
input the name of the variables instead of
the whole formula. First is the dependent
variable, then write down all independent
variables. (e.g: Y c X1 X2 … Xk)
8.Run simple regression-3

The interpretation of the coefficients:
It indicates the effect of a unit change in the
relevant variable on the dependent variable,
holding all other factors constant (“ceteris
paribus”).

Exporting table of results:
Save table using Freeze/Name
Open table, select all, then copy and choose
“formatted”, thus paste in word file.
8.Run simple regression-4
 Test:
 Click View/Coefficient Tests/Wald-Coefficient
Restrictions.
 View
results in the equation window:
 Regression output: click View, then Estimation
output
 Residuals: click View, then Actual, Fitted redisual
The end
Thank you!
Download