Professional Documents
Culture Documents
1 Introduction 2
1.1 Where To Go For Help 2
2 EViews Basics 3
2.1 The EViews Window 3
2.2 Objects 3
2.3 EViews Workfiles 4
2.4 Creating a New Workfile 4
2.5 Importing Data 5
2.6 Working with Series (Variables) 6
2.7 The Workfile Sample 7
3 Descriptive Statistics 8
4 Ordinary Least Square Regression 9
5 Maximum Likelihood Estimation 11
6 Pooled Time Series, Cross-Section Data 13
7 Some EViews Commands 15
Data Handling 15
Descriptive Statistics 15
Graphs 16
Estimation 16
Tests 17
8 Important Operators 18
25.03.02 eviewsguide02.doc
A Quick Guide to EViews 4.0 2
1 Introduction
EViews provides data analysis, estimation, and forecasting tools. The im-
mediate predecessor of EViews was MicroTSP, first released in 1981.
EViews takes advantage of the visual features of modern Windows soft-
ware. You can use your mouse to guide the operation with standard Win-
dows menus and dialogs. Results appear in windows and can be manipu-
lated with standard Windows techniques. Alternatively, you may use
EViews’ command and batch processing language. You can enter and edit
commands in the command window. You can create and store the com-
mands in programs that document your research project for later execution.
The User’s Guide explains the visual approach to using EViews. The
Command and Programming Reference, provides systematic information
about the details of EViews commands. A large portion of the EViews
documentation may be called up from within EViews by using the help
system. Select Help in the main menu. You will find on the EViews web
site a Frequently Asked Questions (FAQ) section: http://www.eviews.com.
A Quick Guide to EViews 4.0 3
2 EViews Basics
You should see the EViews window when you launch the program. Famil-
iarise yourself with the following areas in the EViews Window:
Just below the title bar is the main menu. Below the menu bar is an area
called the command window. EViews commands may be typed in this win-
dow. The command is executed as soon as you hit Enter. The contents of
the command area may be saved directly into a text file for later use: make
certain that the command window is active, and then select File/Save As… .
Some important EViews Commands are listed in Section 5.
The area in the middle of the window is the work area where EViews
will display the workfile window the various other windows that it creates.
2.2 Objects
You can read data directly from files created by other programs. Data may
be in standard ASCII form or in either Lotus (.WKS, .WK1 or .WK3) or
Excel (.XLS) spreadsheet formats. First make certain that you have an open
EViews workfile to receive the contents of the data import. Next, click on
Procs/Import/Read Text-Lotus-Excel... You will see a standard File dialog box
asking you to specify the type and name of the file.
EViews will prompt you for additional information about the import
procedure. The dialog will differ depending on the file type. Most fields of
the dialog box are reasonably self-explaining. You need to tell whether the
data are ordered by observation or by series. “By observation” means that
variables are arranged in columns while “by row” implies that all of the
observations for a variable are in a single row.
Enter the names of the series that you wish to read into the edit box. Al-
ternatively, if the names that you wish to use for your series are contained
in the file, you can simply provide the number of series to be read. The
names must be adjacent to your data. If the data are organised by row and
the starting cell is B2, then the names must be in column A, beginning at
cell A2. If the data are organised by column beginning in B2, then the
names must be in row 1, starting in cell B1. If, in the course of reading the
data, EViews encounters an invalid cell name, it will automatically assign
the next unused name with the prefix SER, followed by a number (e.g.,
SER01, SER02, etc.).
A Quick Guide to EViews 4.0 6
series y = 2*x + 37*z creates the Y series as a function of the X and Z se-
ries
series y = log(y) creates the Y series as the natural logarithm of the
Y series itself
series y = x(- 4) creates the Y series as the fourth lag of the X series
series y = x(2) creates the Y series as the second lead of the X se-
ries
series y = @movav(x,6) creates the Y series as a 6-period moving average
of the X series
series y = x < 3 the Y dummy takes value 1 if X is less than 3 and
0 otherwise
A Quick Guide to EViews 4.0 7
3 Descriptive Statistics
EViews provides both descriptive statistics of a single series (variable) or
of a group of selected series.
To access descriptive statistics of a single series, open the series window
by double clicking on the series name in the workfile. Select
View/Descriptive Stats/ Histogram and Stats. A complement of standard de-
scriptive statistics are displayed along with the histogram. All of the statis-
tics are calculated using observations in the current sample. Alternatively,
you can access descriptive statistics with the menu option
Quick/Series Statistics/Histogram and Stats or the hist command.
To access descriptive statistics of a group of series, select
Quick/Group Statistics/ Descriptive Statistics and enter the names of the series
to be included. There are to alternatives to deal with missing observations:
Common Sample computes the statistics using observations for which there
are no missing values in any of the series in the group. Individual Samples
computes the statistics using all nonmissing observations for each series.
Alternatively, you can use the stats command.
A Quick Guide to EViews 4.0 9
cs c inc r
Alternatively, type the least square command (ls) followed by the equation
specification in the command window:
ls cs c inc r
Note the presence of the series name C in the list of regressors. This is a
built-in EViews series that is used to specify a constant in a regression.
EViews does not automatically include a constant in a regression.
You may include transformed variables in a regression. For example,
ls log(cs) c log(inc)
expression in the dialog in place of the list of variables. EViews will add an
implicit additive disturbance to this equation. For example,
@logl series_name
where series_name is the name of the series which will contain the contribu-
tions. This control statement may appear anywhere in the LogL specifica-
tion. If you would like to remove one or more of the series used in the
specification after evaluation, you can use the @temp statement:
@logl logLi
@temp e
e = y - c(1) - c(2)*x1 - c(3)*x2
logLi = log(1/c(4)*@dnorm(e/c(4)))
After estimating the above example, the elements C(1), C(2), C(3) and C(4)
will contain ML-estimates of the constant, two slope coefficients and the
standard deviation of the error term.
A Quick Guide to EViews 4.0 12
c(4) = 1
@param c(4) 1
In the example above, we used the coefficients C(1) to C(4) as names for
our unknown parameters. More generally, any element of a named coeffi-
cient vector which appears in the specification will be treated as a parame-
ter to be estimated. You can create your own coefficient vectors by the fol-
lowing commands in the command line,
coef(1) alpha
coef(2) beta
coef(1) sigma
You could then write the likelihood specification as
@logl logLi
@temp e
e = y - alpha(1) - beta(1)*x1 - beta(2)*x2
logLi = log(1/sigma(1)*@dnorm(e/sigma(1)))
@param sigma(1) 1
A Quick Guide to EViews 4.0 13
base name for our series and name the series GDP_USA, … GDP_CAN. See
the EViews Help on how to import time series, cross-section data.
The key to work with a set of series is the concept of a pool series. A
pool series is a group of series defined by a base name and the entire list of
cross-section identifiers. Pool series are specified using the base name, and
a “?” character for the cross-section identifier. If your series are named
GDP_USA, … the corresponding pool series will be referred to as GDP?.
You can view your pool series by selecting View/Spreadsheet View, and list-
ing the pool series name. You may compute descriptive statistics of a pool
series with View/Descriptive Statistics. You can generate or modify pool series
using the PoolGenr procedure. Click on PoolGenr on the pool toolbar and
enter your formula, e.g. REALGDP? = GDP?/DEFL?.
Estimation in the pool object allows the following options (always use
the pool series names, e.g. GDP? ):
• There are two types of explanatory variables: Common coefficients are
for pool series that are to have the same coefficient across all cross-
section members of the pool; Cross-section specific coefficients are for
pool series with different coefficients for each member of the pool.
• You can choose between no intercepts, common identical intercept for
all pool members, fixed effects for different intercepts for each cross-
section unit and random effects for a cross-section specific part of the er-
ror term.
• There are three estimation methods: No weighting uses OLS; Cross sec-
tion weights uses FGLS with estimated cross-section residual variances;
SUR is an analogue to Seemingly Unrelated Regression and uses FGLS
with estimated cross-section residual covariance matrix. Models with
random effects model are always estimated using a FGLS procedure.
A Quick Guide to EViews 4.0 15
Data Handling
Descriptive Statistics
Graphs
Estimation
Tests
8 Important Operators