Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Introduction
What is EViews?
EViews provides sophisticated data analysis, regression, and forecasting tools on Windows-
based computers. With EViews you can quickly develop a statistical relation from your data
and then use the relation to forecast future values of the data. Areas where EViews can be
useful include: scientific data analysis and evaluation, financial analysis, macroeconomic
forecasting, simulation, sales forecasting, and cost analysis.
EViews is a new version of a set of tools for manipulating time series data originally devel-
oped in the Time Series Processor software for large computers. The immediate predecessor
of EViews was MicroTSP, first released in 1981. Though EViews was developed by econo-
mists and most of its uses are in economics, there is nothing in its design that limits its use-
fulness to economic time series. Even quite large cross-section projects can be handled in
EViews.
EViews provides convenient visual ways to enter data series from the keyboard or from disk
files, to create new series from existing ones, to display and print series, and to carry out sta-
tistical analysis of the relationships among series.
EViews takes advantage of the visual features of modern Windows software. You can use
your mouse to guide the operation with standard Windows menus and dialogs. Results
appear in windows and can be manipulated with standard Windows techniques.
Alternatively, you may use EViews’ powerful 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.
We have also provided more detailed installation instructions in a separate sheet that you
should have received with your EViews package. If you did not receive this sheet, please
contact our office, or see our website: www.eviews.com.
1
6—Chapter 1. Introduction
Windows Basics
In this section, we provide a brief discussion of some useful techniques, concepts, and con-
ventions that we will use in this manual. We urge those who desire more detail to obtain
one of the many good books on Windows.
The Mouse
EViews uses both buttons of the standard Windows mouse. Unless otherwise specified,
when we say that you should click on an item, we mean a single click of the left mouse-but-
ton. Double click means to click the left mouse-button twice in rapid succession. We will
often refer to dragging with the mouse; this means that you should click and hold the left
mouse-button down while moving the mouse.
Window Control
As you work, you may find that you wish to change the size of a window or temporarily
move a window out of the way. Alternatively, a window may not be large enough to display
all of your output, so that you want to move within the window in order to see relevant
items. Windows provides you with methods for performing each of these tasks.
Scrolling
Windows provides both horizontal and vertical scroll bars so that you can view information
which does not fit inside the window (when all of the information in a window fits inside
the viewable area, the scroll bars will be hidden).
2
Windows Basics—7
the lower portion of our data. The size of the box also changes to show you the relative sizes
of the amount of data in the window and the amount of data that is off-screen. Here, the
current display covers roughly half of the horizontal contents of the window.
Clicking on the up, down, left, or right scroll arrows on the scroll bar will scroll the display
one line in that direction. Clicking on the scroll bar on either side of a scroll box moves the
information one screen in that direction.
If you hold down the mouse button while you click on or next to a scroll arrow, you will
scroll continuously in the desired direction. To move quickly to any position in the window,
drag the scroll box to the desired position.
Minimize/Maximize/Restore/Close
There may be times when you wish to move EViews out of the way while you work in
another Windows program. Or you may wish to make the EViews window as large as possi-
ble by using the entire display area.
In the upper right-hand corner of each window, you will see a set of buttons which control
the window display.
You can minimize your window by clicking on the minimize button in the upper right-hand
corner of the window. To restore a program that has been minimized, click on the icon in
your taskbar.
Lastly, the close button provides you with a convenient method for closing the window. To
close all of your open EViews windows, you may also select Window in the main menu,
and either Close All, or Close All Objects.
3
8—Chapter 1. Introduction
drag the window to a new location. To resize, simply put the cursor on one of the four sides
or corners of the window. The cursor will change to a double arrow. Drag the window to the
desired size, then release the mouse button.
Double clicking on an item will usually open the item. If you have multiple items selected,
you can double click anywhere in the highlighted area.
Selecting File from this menu will open a drop-down menu containing additional com-
mands. We will describe the EViews menus in greater detail in the coming sections.
There are a few conventions which Windows uses in its menus that are worth remembering:
• A grayed-out command means the command is not currently available.
• An ellipse (...) following the command means that a dialog box (prompting you for
additional input) will appear before the command is executed.
4
The EViews Window—9
• A right-triangle (8) means that additional (cascading) menus will appear if you select
this item.
• A check mark (a) indicates that the option listed in the menu is currently in effect. If
you select the item again, the option will no longer be in effect and the check mark
will be removed. This behavior will be referred to as toggling.
• Most menu items contain underlined characters representing keyboard shortcuts. You
can use the keyboard shortcuts to the commands by pressing the ALT key, and then
the underlined character. For example, ALT-F in EViews brings up the File drop-down
menu.
• If you wish to close a menu without selecting an item, simply click on the menu
name, or anywhere outside of the menu. Alternatively, you can press the ESC key.
We will often refer to entering information in dialogs. Dialogs are boxes that prompt for
additional input when you select certain menu items. For example, when you select the
menu item to run a regression, EViews opens a dialog prompting you for additional informa-
tion about the specification, while providing default suggestions for various options. You can
always tell when a menu item opens a dialog by the ellipses in the drop-down menu entry.
Break/Cancel
EViews follows the Windows standard in using the ESC key as the break key. If you wish to
cancel the current task or ongoing operation, simply press ESC.
5
10—Chapter 1. Introduction
You should familiarize yourself with the following main areas in the EViews window.
6
The EViews Window—11
To toggle between the active window and the command window, press F5.
You may move the insertion point to previously executed commands, edit the existing com-
mand, and then press ENTER to execute the edited version of the command.
7
12—Chapter 1. Introduction
The command window supports Windows cut-and-paste so that you can easily move text
between the command window, other EViews text windows, and other Windows programs.
The contents of the command area may also be saved directly into a text file for later use:
make certain that the command window is active by clicking anywhere in the window, and
then select File/Save As… from the main menu.
If you have entered more commands than will fit in your command window, EViews turns
the window into a standard scrollable window. Simply use the scroll bar or up and down
arrows on the right-hand side of the window to see various parts of the list of previously
executed commands.
You may find that the default size of the command window is too large or small for your
needs. You can resize the command window by placing the cursor at the bottom of the com-
mand window, holding down the mouse button and dragging the window up or down.
Release the mouse button when the command window is the desired size.
See also “Window and Font Options” on page 763 of the User’s Guide II for a discussion of
global settings which affect the use of the command window.
When a window is partly covered, you can bring it to the top by clicking on its titlebar or on
a visible portion of the window. You can also cycle through the displayed windows by press-
ing the F6 or CTRL-TAB keys.
Alternatively, you may select a window by clicking on the Window menu item, and select-
ing the desired name.
8
Where to Go For Help—13
You can move a window by clicking on its title bar and dragging the window to a new loca-
tion. You can change the size of a window by clicking on any corner and dragging the corner
to a new location.
Closing EViews
There are a number of ways to close EViews. You can always select File/Exit from the main
menu, or you can press ALT-F4. Alternatively, you can click on the close box in the upper
right-hand corner of the EViews window, or double click on the EViews icon in the upper
left-hand corner of the window. If necessary, EViews will warn you and provide you with
the opportunity to save any unsaved work.
Though we have tried to be complete, it is not possible to document every aspect of EViews.
There are almost always several ways to do the same thing in EViews, and we cannot
describe them all. In fact, one of the strengths of the program is that you will undoubtedly
discover alternative, and perhaps more efficient, ways to get your work done.
Most of the User’s Guide explains the visual approach to using EViews. It describes how you
can use your mouse to perform operations in EViews. To keep the explanations simple, we
do not tell you about alternative ways to get your work done. For example, we will not
remind you about the ALT- keyboard alternatives to using the mouse.
When we get to the discussion of the substantive statistical methods available in EViews, we
will provide some technical information about the methods, and references to econometrics
textbooks and other sources for additional information.
Since EViews uses standard Windows Help, the on-line manual is fully searchable and
hypertext linked.
In addition, the Help system will contain updates to the documentation that were made after
the manuals went to press.
9
14—Chapter 1. Introduction
Another popular area is our Download Section, which contains on-line updates to EViews 5,
sample data and programs, and much more. Your purchase of EViews provides you with
much more than the enclosed program and printed documentation. As we make minor
changes and revisions to the current version of EViews, we will post them on our web site
for you to download. As a valued QMS customer, you are free to download updates to the
current version as often as you wish.
So set a bookmark to our site and visit often; the address is:
http://www.eviews.com.
10
Chapter 2. A Demonstration
Before we describe the process of reading a foreign data file, note that the data for this
demonstration have been included in both Excel spreadsheet and EViews workfile for-
mats in your EViews installation directory (“./Example Files/Data”). If you wish to
skip the discussion of opening foreign files, going directly to the analysis part of the
demonstration, you may load the EViews workfile by selecting File/Open/Foreign
Data as Workfile… and opening DEMO.WF1.
The easiest way to open the Excel file DEMO.XLS, is to drag-and-drop the file into an
open EViews application window. You may also drag-and-drop the file onto the EViews
icon. Windows will first start the EViews application and will then open the demon-
stration Excel workfile.
Alternately, you may use the File/Open/EViews workfile... dialog, selecting Files of
type Excel and selecting the desired file.
11
16—Chapter 2. A Demonstration
As EViews opens the file, the program determines that the file is in Excel file format, ana-
lyzes the contents of the file, and opens the Excel Read wizard.
12
Getting Data into EViews—17
adjust the options that appear on the second page of the wizard. In our example, the data
appear to be correct, so we simply click on Finish to accept the default settings.
When you accept the settings, EViews automatically creates a workfile that is sized to hold
the data, and imports the series into the workfile. The workfile ranges from 1952 quarter 1
to 1996 quarter 4, and contains five series (GDP, M1, OBS, PR, and RS) that you have read
from the Excel file. There are also two objects, the coefficient vector C and the series RESID,
that are found in all EViews workfiles.
In addition, EViews opens the imported data in a spreadsheet view, allowing you to perform
a initial examination of your data. You should compare the spreadsheet views with the Excel
worksheet to ensure that the data have been read correctly. You can use the scroll bars and
scroll arrows on the right side of the window to view and verify the reminder of the data.
You may wish to click on Name in the group toolbar to provide a name for your UNTITLED
group. Enter the name ORIGINAL, and click on OK to accept the name.
Once you are satisfied that the data are correct, you should save the workfile by clicking on
the Save button in the workfile window. A saved dialog will open, prompting you for a
workfile name and location. You should enter DEMO2.WF1, and then click OK. A second
dialog may be displayed prompting you to set storage options. Click OK to accept the
defaults. EViews will save the workfile in the specified directory with the name
13
18—Chapter 2. A Demonstration
Similarly, to examine a line graph of the series, simply select View/Graph... to bring up the
Graph Options dialog, and select Line & Symbol from the list of graph types on the left-
hand side. EViews will change the M1 series window to display a line graph of the data in
the M1 series.
14
Examining the Data—19
At this point, you may wish to explore the contents of the View and Proc menus in the M1
series window to see the various tools for examining and working with series data. You may
always return to the spreadsheet view of your series by selecting View/Spreadsheet from
the toolbar or main menu.
Since our ultimate goal is to perform regression analysis with our data expressed in natural
logarithms, we may instead wish to work with the log of M1. Fortunately, EViews allows
you to work with expressions involving series as easily as you work with the series them-
selves. To open a series containing this expression, select Quick/Show… from the main
menu, enter the text for the expression, log(m1), and click OK. EViews will open a series
window for containing LOG(M1). Note that the titlebar for the series shows that we are
working with the desired expression.
You may work with this auto-series in exactly the same way you worked with M1 above. For
example, clicking on View in the series toolbar and selecting Descriptive Statistics & Tests/
Histogram and Stats displays a view containing a histogram and descriptive statistics for
LOG(M1):
15
20—Chapter 2. A Demonstration
Suppose that you wish to examine multiple series or series expressions. To do so, you will
need to construct a group object that contains the series of interest.
Earlier, you worked with an EViews created group object containing all of the series read
from your Excel file. Here, we will construct a group object containing expressions involving
a subset of those series. We wish to create a group object containing the logarithms of the
series M1 and GDP, the level of RS, and the first difference of the logarithm of the series PR.
Simply select Quick/Show... from the main EViews menu, and enter the list of expressions
and series names:
log(m1) log(gdp) rs dlog(pr)
16
Examining the Data—21
Click on OK to accept the input. EViews will open a group window containing a spreadsheet
view of the series and expressions of interest.
As with the series object, you will use the View and Proc menus of the group to examine
various characteristics of the group of series. Simply click on the buttons on the toolbar to
access these menu entries or select View or Proc from the main menu to call up the relevant
entries. Note that the entries for a group object will differ from those for a series object since
the kinds of operations you may perform with multiple series differ from the types of opera-
tions available when working with a single series.
For example, you may select View/Graph... from the group object toolbar, and then select
Line & Symbol from the list on the left side of the dialog to display a single graph containing
line plots of each of the series in the group:
17
22—Chapter 2. A Demonstration
Alternately, you may select View/Graph... and choose Multiple graphs from the Multiple
series drop-down on the right side of the dialog to display the same information, but with
each series expression plotted in an individual graph:
Note that the number of observations used for computing descriptive statistics for
DLOG(PR) is one less than the number used to compute the statistics for the other expres-
sions. By electing to compute our statistics using “Individual Samples”, we informed EViews
that we wished to use the series specific samples in each computation, so that the loss of an
observation in DLOG(PR) to differencing should not affect the samples used in calculations
for the remaining expressions.
18
Estimating a Regression Model—23
We may instead choose to use “Common Samples” so that observations are only used if the
data are available for all of the series in the group. Click on View/Covariance Analysis...
and select the Correlation checkbox to display the correlation matrix of the four series for
the 179 common observations:
Once again, we suggest that you may wish to explore the contents of the View and Proc
menus for this group to see the various tools for examining and working with sets of series
You can always return to the spreadsheet view of the group by selecting View/Spreadsheet.
where log(M1) is the logarithm of the money supply, log(GDP) is the log of income, RS is
the short term interest rate, and Dlog ( PR ) is the log first difference of the price level (the
approximate rate of inflation).
To estimate the model, we will create an equation object. Select Quick from the main menu
and choose Estimate Equation… to open the estimation dialog. Enter the following equa-
tion specification:
19
24—Chapter 2. A Demonstration
Here we list the expression for the dependent variable, followed by the expressions for each
of the regressors, separated by spaces. The built-in series name C stands for the constant in
the regression.
The dialog is initialized to estimate the equation using the LS - Least Squares method for
the sample 1952Q1 1996Q4. You should change text in the Sample edit box to “1952Q1
1992Q4” to estimate the equation for the subsample of observations.
Click OK to estimate the equation using least squares and to display the regression results:
20
Estimating a Regression Model—25
Note that the equation is estimated from 1952Q2 to 1992Q4 since one observation is
dropped from the beginning of the estimation sample to account for the DLOG difference
term. The estimated coefficients are statistically significant, with t-statistic values well in
2
excess of 2. The overall regression fit, as measured by the R value, indicates a very tight fit.
You can select View/Actual, Fitted, Residual/Actual, Fitted, Residual Graph in the equa-
tion toolbar to display a graph of the actual and fitted values for the dependent variable,
along with the residuals:
21
26—Chapter 2. A Demonstration
Note that the coefficients are assigned in the order that the variables appear in the specifica-
tion so that the coefficient for the PR term is labeled C(4). To test the restriction on C(4) you
should select View/Coefficient Tests/Wald–Coefficient Restrictions…, and enter the
restriction c(4)=2. EViews will report the results of the Wald test:
Wald Test:
Equation: Untitled
The low probability values indicate that the null hypothesis that C(4)=2 is strongly rejected.
We should, however, be somewhat cautious of accepting this result without additional anal-
ysis. The low value of the Durbin-Watson statistic reported above is indicative of the pres-
22
Specification and Hypothesis Tests—27
ence of serial correlation in the residuals of the estimated equation. If uncorrected, serial
correlation in the residuals will lead to incorrect estimates of the standard errors, and invalid
statistical inference for the coefficients of the equation.
The Durbin-Watson statistic can be difficult to interpret. To perform a more general Breusch-
Godfrey test for serial correlation in the residuals, select View/Residual Tests/Serial Corre-
lation LM Test… from the equation toolbar, and specify an order of serial correlation to test
against. Entering 1 yields a test against first-order serial correlation:
Test Equation:
Dependent Variable: RESID
Method: Least Squares
Date: 07/18/06 Time: 16:36
Sample (adjusted): 1952Q2 1992Q4
Included observations: 163 after adjustments
Presample missing value lagged residuals set to zero.
The top part of the output presents the test statistics and associated probability values. The
test regression used to carry out the test is reported below the statistics.
The statistic labeled “Obs*R-squared” is the LM test statistic for the null hypothesis of no
serial correlation. The (effectively) zero probability value strongly indicates the presence of
serial correlation in the residuals.
23
28—Chapter 2. A Demonstration
One approach is to include lags of the independent variables. To add variables to the existing
equation, click on the Estimate button in the equation toolbar and edit the specification to
include lags for each of the original explanatory variables:
log(m1) c log(gdp) rs dlog(pr) log(m1(-1)) log(gdp(-1)) rs(-1)
dlog(pr(-1))
Note that lags are specified by including a negative number, enclosed in parentheses, follow-
ing the series name. Click on OK to estimate the new specification and to display the results:
Note that EViews has automatically adjusted the estimation sample to accommodate the
additional lagged variables. We will save this equation in the workfile for later use. Press the
Name button in the toolbar and name the equation EQLAGS.
24
Modifying the Equation—29
One common method of accounting for serial correlation is to include autoregressive (AR)
and/or moving average (MA) terms in the equation. To estimate the model with an AR(1)
error specification, you should make a copy of the EQLAGS equation by clicking Object/
Copy Object… in the EQLAGS window. EViews will create a new untitled equation contain-
ing all of the information from the previous equation. Press Estimate on the toolbar of the
copy and modify the specification to read
log(m1) c log(gdp) rs dlog(pr) ar(1)
This specification removes the lagged terms, replacing them with an AR(1) specification:
log ( M1 t ) = b 1 + b 2 log ( GDP t ) + b 3 RS t + b 4 Dlog ( PR t ) + u t
(2.2)
u t = ru t – 1 + e t
Click OK to accept the new specification. EViews will estimate the equation and will report
the estimation results, including the estimated first-order autoregressive coefficient of the
error term:
25
30—Chapter 2. A Demonstration
The fit of the AR(1) model is roughly comparable to the lag model, but its somewhat higher
values for both the Akaike and the Schwarz information criteria indicate that the previous
lag model may be preferred. Accordingly, we will work with the lag model in EQLAGS for
the remainder of the demonstration.
Click on the Forecast button in the EQLAGS equation toolbar to open the forecast dialog:
26
Forecasting from an Estimated Equation—31
We set the forecast sample to 1993Q1–1996Q4 and provide names for both the forecasts and
forecast standard errors so both will be saved as series in the workfile. The forecasted values
will be saved in M1_F and the forecast standard errors will be saved in M1_SE.
Note also that we have elected to forecast the log of M1, not the level, and that we request
both graphical and forecast evaluation output. The Dynamic option constructs the forecast
for the sample period using only information available at the beginning of 1993Q1. When
you click OK, EViews displays both a graph of the forecasts, and statistics evaluating the
quality of the fit to the actual data:
Alternately, we may also choose to examine forecasts of the level of M1. Click on the Fore-
cast button in the EQLAGS toolbar to open the forecast dialog, and select M1 under the
Series to forecast option. Enter a new name to hold the forecasts, say M1LEVEL_F, and click
27
32—Chapter 2. A Demonstration
OK. EViews will present a graph of the forecast of the level of M1, along with the asymmet-
ric confidence intervals for this forecast:
The series that the forecast procedure generates are ordinary EViews series that you may
work with in the usual ways. For example, we may use the forecasted series for LOG(M1)
and the standard errors of the forecast to plot actuals against forecasted values with (approx-
imate) 95% confidence intervals for the forecasts.
We will first create a new group object containing these values. Select Quick/Show... from
the main menu, and enter the expressions:
m1_f+2*m1_se m1_f-2*m1_se log(m1)
to create a group containing the confidence intervals for the forecast of LOG(M1) and the
actual values of LOG(M1):
There are three expressions in the dialog. The first two represent the upper and lower
bounds of the (approximate) 95% forecast interval as computed by evaluating the values of
28
Forecasting from an Estimated Equation—33
the point forecasts plus and minus two times the standard errors. The last expression repre-
sents the actual values of the dependent variable.
When you click OK, EViews opens an untitled group window containing a spreadsheet view
of the data. Before plotting the data, we will change the sample of observations so that we
only plot data for the forecast sample. Select Quick/Sample… or click on the Sample button
in the group toolbar, and change the sample to include only the forecast period:
To plot the data for the forecast period, select View/Graph... from the group window and
choose Line & Symbol from the list on the left of the Graph Options dialog:
The actual values of log(M1) are within the forecast interval for most of the forecast period,
but fall below the lower bound of the 95% confidence interval beginning in 1996:1.
For an alternate view of these data, you can select View/Graph... and Error Bar from the
list in the dialog, which displays the graph as follows:
29
34—Chapter 2. A Demonstration
Additional Testing
Note that the above specification has
been selected for illustration pur-
poses only. Indeed, performing vari-
ous specification tests on EQLAGS
suggests that there may be a number
of problems with the existing specifi-
cation.
For one, there is quite a bit of serial correlation remaining even after estimating the lag spec-
ification. A test of serial correlation in the EQLAGS equation (by selecting View/Residual
Tests/Serial Correlation LM Test…, and entering 1 for the number of lags) rejects the null
hypothesis of no serial correlation in the reformulated equation:
ARCH Test:
F-statistic 11.21965 Probability 0.001011
Obs*R-squared 10.61196 Probability 0.001124
In addition to serial correlation and ARCH, there is an even more fundamental problem with
the above specification since, as the graphs attest, LOG(M1) exhibits a pronounced upward
trend, suggesting that we should perform a unit root in this series. The presence of a unit
root will indicate the need for further analysis.
We once again display the LOG(M1) series window by clicking on Window and selecting
the LOG(M1) series window from the menu. If the series window for LOG(M1) is not
present (if you previously closed the window), you may again open a new window by
selecting Quick/Show…, entering log(m1), and clicking OK.
30
Additional Testing—35
Before computing the test statistic, we will reset the workfile sample to all of the observa-
tions by clicking on Quick/Sample... and entering @all in the dialog.
Next, to perform an Augmented Dickey-Fuller (ADF) test for nonstationarity of this series,
select View/Unit Root Test… and click on OK to accept the default options. EViews will
perform an ADF test and display the test results. The top portion of the output reads:
t-Statistic Prob.*
EViews performs the ADF test statistic with the number of lagged difference terms in the test
equation (here, four) determined by automatic selection. The ADF test statistic value has a
probability value of 0.9911, providing little evidence that we may reject the null hypothesis
of a unit root.
If a unit root were present in our data, we may wish to adopt more sophisticated statistical
models. These techniques are discussed in Chapter 26. “Time Series Regression” and
Chapter 34. “Vector Autoregression and Error Correction Models” of the User’s Guide II
which deal with basic time series and vector autoregression and vector error correction
specifications, respectively).
31
36—Chapter 2. A Demonstration
32