EViews Guide
EViews Guide
Economic Studies
Starting Up EViews
To start EViews on a computer in a computer lab within the university go to:
Start All programs School Software Social Sciences
Accounting and Finance Eviews 9
Importing Data
There are several ways to import your data into EViews: from a text file (.txt), an Excel
spreadsheet (.xls) or a previously created EViews workfile (.wf1). Direct input is also
possible, but will not be covered here.
1. Creating an empty workfile.
From the main toolbar select:
File New Workfile
Page 1
A Workfile Create window will popup. Use the drop-down list on the top left corner of this
window to specify the Workfile structure type. The most common choices will be:
(a) Unstructured/Undated: This is the most general format for importing data and the one
we will use for this module. You only need to specify the number of observations in
the Data range space.
(b) Dated regular frequency: This format is preferred when working with time-series
data. You need to specify the data frequency from the drop-down list and specify the
Start date and End date: Some examples are:
Annual: Start date: 1990 , End date: 2000
Quarterly: Start date: 1990:1 , End date: 2000:4
Monthly: Start date: 1990:1 , End date: 2000:12
(c) Balanced Panel: This format is designed to work with data that are organized in a
panel structure: multiple units observed for multiple years. Here you need to provide
both the frequency and start/end dates for the time dimension and the number of units
in the panel (number of cross sections).
Note: If you wish to give your workfile a name at this point then enter the name in the lower
left corner of the Workfile Create window. When details are complete Click OK.
You will see a Workfile Window inside the EViews workspace, containing two objects: c and
resid.
Page 2
(ii)
In the Open window that pops up, locate the Excel file you wish to import and click
Open. (To try this on your own you can use the GuideData.xls file from the modules
website on MyDundee.) Usually EViews does a good job recognizing the beginning
and ending of the data in a spreadsheet, so you will rarely need to change the defaults.
Page 3
In the popup window click either Yes or No (this option will have limited effect for the
purposes of this module). Additional objects, x and y in our case, should now appear in the
Workfile window as shown below:
Page 4
EViews has a long list of plot types that it can produce but we are currently interested in a
scatter plot. Selecting Scatter under the Graph type area of the Graph Options window that
pops up will produce the following plot:
Page 5
Notice that the Graph window has a number of buttons and menu items located at the top. To
save the graph as a separate object in your Workfile click on the Name button from this list
and provide a suitable name for the graph. Then click OK. If you save your Workfile now, the
next time you load it (the Workfile) you will be able to double click on the newly-created
graph object and view it.
You are free to pick the name you give to the new variable, but it is a good practice to use
informative names, as it is done from the second example onwards. Some care is required
however: if you type in x = log(x) then the x variable in the Workfile will be replaced by the
log of x - i.e. the original variable is overwritten by the new variable (this can create a big
mess if at some point you forget that you have done such an overwriting).
Page 6
A Group window will open with the variables listed and with its own buttons and menu items
located at the top.
These buttons allow a range of operations to be carried out on the group of variables. For
example, to create a scatter plot of x and y, click on View Graph on the Group
windows menu. You will need to go through some additional steps to create the scatter plot,
but these are intuitive and very similar to the ones described under point a. of this section.
Page 7
Clicking on View Descriptive Statistics & Tests Stats Table in the Series windows
menu will produce a table of summary statistics for the variable.
The Series menu will allow a range of analyses to be carried out apart from simple summary
statistics: simple hypothesis tests, graphing and many more.
and hitting enter will create a single valued object named average and add it to the Workfile.
Page 8
To view the contents of this scalar simply double-click the object in the Workfile window and
look at value of the Scalar window that pops up.
Page 9
In the Equation Estimation window you have to type the specification of your model as:
dependent_variable c idependent_variable1 idependent_variable2
(variable names separated by spaces)
For example, to regress y on a constant and x type:
ycx
(iii) You can change the estimation method although for EC50001 it will always be Least
Squares.
(iv) If you wish to estimate the model using a subset of the full dataset then you can change
the sample range at the bottom of the window.
Page 10
Once you click OK, the Equation window appears containing the standard output from OLS
estimation of the model which can then be reported, analysed, etc.
Note: You can save the specification of your model as an object in the Workfile by clicking
on Name in the Equation window menu.
Page 11
Here the residuals are graphed by observation number which is fine for time-series data and
checking for the presence of autocorrelation. To visually check for heteroskedasticity or nonlinearity, we need to plot the residuals against the independent variable(s). This is a scatter
plot and, given that we have both the residuals and the independent variable(s) in the Workfile
window, we do can such a plot using the instructions given under Data Analysis with
EViews, part a. of this document. Such a plot is given below:
Note that, as usual, you can save the residual graph as an object in the Workfile by clicking on
the Name button of the Graph window. On the Estimation window select View
Estimation Output to return to the estimation output.
Page 12
EView uses a t-test to test this simple hypothesis and reports the associated p-value. This
simple hypothesis can also be tested using an F-test and produces the same p-value. The Chisquare test is similar to the F-test but makes no degrees-of-freedom correction (this is why the
p-value is slightly different).
Page 13
For joint-hypotheses testing use commas to separate the individual coefficient values. For
example, in a multiple linear regression model we could test jointly the hypotheses implied by
the command:
c(2)=5, c(3)=6, c(4)=0
Finally, note that the estimates of the coefficients are stored in the object labelled c in the
Workfile window. The order in which they appear corresponds to the order in which the
constant and the explanatory variables appear in the specification of the model in the Equation
window. In the example above c(1) would be the constant, c(2) would be the coefficient of the
first explanatory variable and so on.
Page 14