EViews tutorial




 

WB01434_.gif (237 octets)back to econometric estimation
 
 

Questions

How can I enter my statistical data ?
  
How can I generate a new data serie from one or several other data series ?
How can I draw a graph?
How can I modify the sample range ?
How can I estimate my model with the ordinary least squares estimation method ?
How can I estimate my model with the generalized least squares estimation method ?
How can I get residuals correlograms ?
How can I get statistical tests ?
How can I smooth a time serie or adjust it for seasonal variations ?
How can I do forecasting ?
How can I handle with a simultaneous equations system ?
How can I do pooling ?
What are the main Eviews commands ?

 


Answers

 
Enter your statistical data
 
Select File New Workfile and choose a name for your workfile using the dialog box. After clicking OK, another dialog box comes to screen. Choose the frequency of your data series and specify your sample range. When you use a quarterly frequency, you have to write the quarter number too. For instance, you will type 1980:1 to 1999:4. You get a workfile in which you can enter your data. But first of all you have to create the data series. Therefore click on Object New and select Serie giving it a name. Repeat this stage to create every serie. The series will appear on your workfile. Last but not least you will enter your data into each serie. Click on the serie icon and on the button Edit +/- of the new window. Then type your data. Before closing the window, click again on Edit +/-.

Notice : if you work with cross section data instead of time series, choose the undated frequency and give a number to each country (if we are talking about countries) or industriy or whatever it is.

wpe80C02.TMP.gif (1140 octets)

Generate a new serie

Afteropening your workfile with File Open Workfile name, use the Genr command by writing an expression in the command line just below the main menu. For instance, you will type Genr NewSerie=(Serie1*Serie2)/Serie3. To deflate a nominal GDP serie with a price index, you could write : Genr RealGDP=NomGDP/Price. The operators of expressions are the classical +, -, *, / and a few more described in the help of the software. The new serie will appear next to the others on the workfile.

wpe80C02.TMP.gif (1140 octets)

Draw a graph

Open your workfile by selecting File Open Workfile Name and type Plot in the command line. You have to specify the name of the serie to plot. For instance, Plot RealGDP. The graph comes to screen in a reduced window. Select the window on the whole screen. Click on the Options button of the graph menu and choose the graph options with the new dialog box. After closing the graph window you can save your graph by choosing a name in the dialog box that appears at screen. Your graph will appear as a graphic object next to the others series objects in your workfile.

wpe80C02.TMP.gif (1140 octets)

Change the sample range

After opening your workfile, type Smpl first period last period in the command line just below the main menu. For instance, if you have a sample between 1950 and 1995, you could type Smpl 1970 1990 to change the sample range.

wpe80C02.TMP.gif (1140 octets)

Estimate your model with the ordinary least squares method

After opening your workfile, type in the command line just below the main menu :
LS Dependent Variable Name C Independent Variables Names separated by a space between the names. For instance, if we regress consumption on yield after creating the consumption and yield series, we have to write the following instruction : LS Consumption C Yield. The following table is supplied to you by the software :

LS // Dependent Variable is CONSUMPTION               
Sample: 1948 1994 
Included observations: 47 
Excluded observations: 0 after adjusting endpoints
Variable
 
C
YIELD
Coefficient

6086.105
0.861840

Std. Error

1045.405
0.010610

T-Statistic

5.821767
81.22654

Prob.T-Stat

0.0000
0.0000

R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
Durbin-Watson stat
0.993226
0.993075
2518.732
2.85E+08
-433.749
0.211522
Mean dependent var
S.D. dependent var
Akaike info criterion
Schwartz criterion
F-statistic
Prob(F-statistic)
85584.15
30267.53
15.70464
15.78337
6597.751
0.000000

        
As you can see, this table give you the main statistical values you need to analyse your regression. The menu of the equation window enable you to get others interesting views of your regression. For instance, if you click on the Resids button then you get a residuals graph.
 
wpe80C02.TMP.gif (1140 octets)
 

 
Estimate your model with the generalized least squares method
 
3 different cases :

btzbul2a.gif (212 octets) you are doing a pooling : Eviews directly apply the GLS method;

btzbul2a.gif (212 octets) you can convert the GLS case into an OLS case. For instance, if you have a serial correlation problem you can apply a Cochrane-Orcutt procedure by writing the following command : LS CONSUMPTION C YIELD AR(1), where AR(1) is used to apply this procedure;

btzbul2a.gif (212 octets) you proceed in the same way as you estimate an equation with the OLS method, but you click on the estimate button of the equation window to choose the right estimation methods and their options. Please be cautious and choose the right estimation methods and parameters after checking them in the econometric litterature. You are not just doing press-buttons econometrics.

wpe80C02.TMP.gif (1140 octets)

Get residuals correlograms
 
After getting your regression, click on the view button of the equation window. Then select Residuals Tests Correlogram. Please indicate the maximal self correlation order you want. If you choose 3, for instance, you get first order, second order and third order self correlation of residuals. To come back to regression results click on the stats button.

wpe80C02.TMP.gif (1140 octets)

Compute statistical tests

After computing your regression, the t, F and Durbin-Watson test are directly available in the equation window. If you want to compute other statistical tests, click on the view button of the equation window and select either Coefficient Tests or Residuals Tests or Stability Tests. To come back to regression results click on the stats button.

wpe80C02.TMP.gif (1140 octets)

Smooth a time serie or adjust it for seasonal variation

Type seas or smooth in the command line placed just below the main menu. Indicate the name of the serie into the dialog box. Another dialog box comes to screen and you choose the right methods and parameters to smooth the time serie or to adjust it for seasonal variations.

wpe80C02.TMP.gif (1140 octets)

Forecasting

After getting your regression results, click on the forecast button of the menu in the equation window. Apply the best method to your case. So you have to think to that very well... Look at our econometric bibliography if you have some doubt.
 
wpe80C02.TMP.gif (1140 octets)

Work with a simultaneous equations system

After opening your workfile, click on Object New System and give it a name. A new window comes to screen. Write in it your system using its structural form. The system parameters as the constants and coefficients are writtenn C(1) C(2) C(3) ... C(n). For instance, you could type the following system with five parameters to estimate :

CONSUMPTION = C(1) + C(2)*YIELD
INVESTMENT = C(3) + C(4)*YIELD + C(5)*YIELD(-1)
YIELD = CONSUMPTION + INVESTMENT + GOVERNMENTEXPENSES
 
Notice : YIELD(-1) means the yield at the former period.

After writting your model, you can estimate it. Only click on the estimate button of the system window. A dialog box will ask you to choose the right method of estimation. Apply the method that suits well to your case. For further tips, type system in the search engine of the software help and choose system estimation. Advice : have a look to our econometric bibliography too.

wpe80C02.TMP.gif (1140 octets)

Pooling

Sometimes cross-section and time-series data are merged or pooled. The result could be interpreted as a cross section of time series or a time series of cross sections. After opening your workfile, select Objects New Object and choose Pool giving it a name. Identify the elements which differentiate the countries or years in the new window you can view on the screen. For instance, if you got variables for 24 countries and for the years 95 and 96, type 95 and 96 as identifiers. But be careful ! You should have created the series before doing your pooling. The names of the series have to contain the identifier. In our case, you should have written the yield series in the following way : YIELD95 and YIELD96. After that click on the sheet button of the pool window and type the series names replacing the identifier by a question mark ?. For instance, YIELD? PRICE? DEMAND?. Another window comes to screen with the data. Click on the estimate button and write the variables names with a ? instead of the idenfier part. For instance, DEMAND? in Dependent Variable and YIELD? PRICE? in Common coefficients. Choose the right methods and parameters. Perhaps you need to check in the econometric litterature or in the software help.
 
wpe80C02.TMP.gif (1140 octets)
 


Main Eviews commands

The most used commands are in bold. Most of these are available through different software menus. The software help explains clearly every command (very well done). If you work with EViews 3.1., don't forget to check Object Reference, Function Reference, Matrix & String Reference and Programming Reference in the help menu.
 

ADD Test addition of variables
ADF Unit root test
AR Autoregressive error specification
ARCH Test
ASSIGN Assign name to series in model
AUTO Serial correlation LM test
BAR Bar graph of series
CAUSE Granger causality test
CCOPY Copy series from CITIBASE to data bank
CFETCH Fetch a series from CITIBASE into RAM
CHDIR Change subdirectory
CHOW Chow test for stability
CLABEL Read a CITIBASE series description
CLOSE Close object or file

COEF Declare coefficient vector
COINT Cointegration test
COR Correlation matrix
COV Covariance matrix
CREATE Create a new workfile
CROSS Cross correlations
D Delete objects from workfile
DATA Enter data from keyboard
EQUATION Define equation
EXIT Exit from EViews
EXPAND Lengthen workfile
FETCH Fetch objects from disk into the workfile
FIT Calculate fitted values
FOR For loop
FORECAST Compute a forecast
FREEZE Create a view object from a view

GENR Generate a new series from a formula
GROUP Create a group
HIST Histogram and normality test
IDENT Time series identification of residuals
IF statement
IDENT Identify a time series process
LOAD Load a workfile
LOGIT Estimate logit model
LS Least squares estimation
MA Moving average error specification
MATRIX Declare MATRIX object
MODEL Declare a model
NA Not available code
NEXT End of FOR loop
NRND Random number generator
PARAM Set parameters

PDL Polynomial distributed lag
PIE Pie chart
PLOT Line graph
PRINT Print objects
PROBIT Estimate probit model
PROGRAM Declare a program
R Rename object
READ Read data from a foreign disk file
RESET test
ROWVECTOR Declare a ROWVECTOR object
RUN Run a program
SAMPLE Declare a sample
SCALAR Declare a SCALAR
SAR Seasonal autoregressive term
SAVE Save the current workfile on disk
SCALAR Declare scalar

SCAT Scatter diagram of two series
SEAS Seasonal adjustment
SERIES Create a new series from a formula
SETCELL Insert contents into cell of table
SETCOLWIDTH Set width of cell of table
SETLINE Place a horizontal line in a table
SHOW Display objects
SMA Seasonal moving average term
SMOOTH Exponential smoothing
SMPL Specify the sample for series
SORT Sort the work file
STATS Descriptive statistics
STEP Step size in FOR loop
STOP Break out of loop

STORE Store objects on disk
SYM Declare a SYM object
SYSTEM Declare system of equations
TEST Specification and diagnostic tests
TO Upper limit of FOR loop
TSLS Two stage least squares
UROOT Unit root test
VAR Define a Vector Autoregression
VECTOR Declare a VECTOR object
WALD Wald test
WEND End of WHILE clause
WHILE Control statement
WHITE White's test for heteroskedasticity
WORKFILE Create or change workfile
WRITE Write a file with multiple series

wpe80C02.TMP.gif (1140 octets)