Advanced Eviews for Econometrics Course
Advanced Eviews for Econometrics Course
YEAR OF STUDY: L3
Mail:calixealakonon@[Link]
1
Warning
This course material is in provisional version and should not be distributed without permission from
the author. Comments, suggestions, and remarks are welcome.
2
Summary
▪ Usage
▪ Creation
▪ Management
Chapter 2: Statistical Analysis
▪ Graphical representations
▪ Descriptive statistics
Chapter 3: Econometrics
▪ Estimations
▪ Tests
▪ Method
3
1. Course Objectives
Econometrics refers to a set of statistical methods aimed at quantifying
economic phenomena. It is a valuable tool for analysis and assistance for its users.
in decision-making. This course material offers training in the practice of econometrics
on Eviews.
❖ General objective
This course aims to enable the learner to master the practice of econometrics.
❖ Specific objectives
At the end of the course, the learner should be able to:
To perform descriptive analyses on Eviews
To perform multiple linear regressions on Eviews
To carry out the different tests related to general linear model estimates
Etc...
2. Course Content
The course consists of an introduction and successive parts for the completion of a
estimation on Eviews.
3. Evaluation method
Two assessment methods are retained in the context of this course. This is the assessment
formative (continuous assessment) and summative evaluation (end-of-semester exam).
Formative assessment can also take the form of presentations or homework to be submitted.
on copy.
4. Teaching Method
The course will be projected. Some parts of the course will be subject to individual activities.
then in a small group.
5. Educational tools
It consists of the current course materials, board, chalk or markers, projector, internet,
etc.
6. Bibliographic References
Doucoure, F., (2005), "Econometric Methods: Lectures and Practical Work", University
Cheikh Anta Diop, Dakar.
Greene, W. (2000), "Econometric Analysis", Prentice Hall, 4th edition.
Hamilton, J., (1994), "Time Series Analysis", Princeton University Press.
Lardic, S., and Mignon, V., (2002), "Econometrics of macroeconomic time series and
financial" , Economica.
4
Régis Bourbonnais (2011), 'Econometrics: manual and solved exercises', Dunod, 8th ed.
Introduction
In this course, the software Eviews 9 is used for the various applications proposed here.
The goal is to show how Eviews meets the needs of economic analysis.
It is also important to have prerequisites in econometric analysis and time series analysis.
temporal. Otherwise, the reading of the appropriate literature will be strong about it.
The developments mainly focus on the presentation of the Eviews software. It will be about
give students the basic elements to use this software. Then, will intervene
the analysis of economic series, notably statistical analysis through representations
graphics and descriptive statistics. Also the study of the general linear model. This
will allow us to present the estimation by the OLS and the various tests associated with the model
general linear.
5
Chapter 1: Introduction to Eviews
6
2. Create or open a work file (WORKFILE)
Having launched Eviews, you need to create your workspace.
7
The creation of your workspace depends on the type of econometric analysis you want.
perform: Cross-sectional data econometrics, time series econometrics and
the econometrics of panel data.
You must therefore choose one of these options in 'Workfile structure type'
▪ For time series econometrics, you choose 'Dated-regular-frequency'
In this case, specify the nature of the data (annual, quarterly, etc.)
you will then specify the start and end dates.
▪ For the econometrics of cross-sectional data, you choose
Unstructured/Undated. In this case, you just specify the number of observations.
▪ For panel data econometrics, you choose 'Balanced Panel'; you
fill in the corresponding fields then.
Let's consider the three series summarized in Table 1 below from 1972 to 2004 except for GDP which
ends in 2001. In this table "Invest, GDP and Interest" respectively refer to
Private investment, Gross Domestic Product and the interest rate of the interbank market
BENI country.
8
1998 867 4646 6.25
1999 925 4752 5.75
2000 4371 6.5
2001 4620 6.5
2002 4625 6.75
2003 4635 6.85
2004 4650 7.5
Since this involves time series, we can choose for the creation of our workfile.
Dated-regular-frequency. We filled in the fields as indicated in the diagram.
underneath.
9
This Workfile does not yet contain the variables. We will need to bring the data into the
software. Several possibilities exist to do it. We choose here to do
first entering the data into an Excel file and then importing said file
in Eviews.
3. Data imports
The data to be imported is located in Excel on your computer (the data from table 1).
The steps for importing are as follows. In the main menu, do:
File/Import/Import from file
You then select the Excel file on your computer. Once found, you click
on 'open' and it displays the following:
10
You then click on 'Next', 'Next' and finally 'Finish'. The data appears
now in your Workfile as follows:
You have just created the working file. The three series appear in the file. Save
this file named 'Econometric Practice FASEG' via the following instruction: File/Save As.
To view the observations of a series, double click on the series. To view the
four series, select them and click 'Open' then 'as group' and finally confirm. Or click
on 'View' then 'Show'; enter the names of the variables you want to open together
then validate.
11
To modify/edit the data of one or more series
Select the series or series then double click then <edit +/–>.
If the series is in graphical representation or on other functions (correlation, statistics,
etc.) select <View> then <Spreadsheat> then <edit +/–>
12
Chapter 2: Descriptive Analysis
2.1. Graphical representation of the series
In the database toolbar, click on <View> then <Graph>.
To modify the chart options, double click on the chart area and do
Graph option.
Open the investment and GDP series together, then follow the next instruction after opening.
the graphical representation: View/Graph/
You click on 'OK'. The two series are represented in the same graph as
indicated below:
13
The two series each show an upward trend over time.
❖ Create a multi-series graph
To create a series group
Open the group and then go to View/Graph... then OK
If you want to get multiple charts in one window, click on Options, then in
Multiple Series, click on Multiple Graphs
To change the Template, also click on Options (or double-click on the graph), then
Template & Objects then let yourself be guided
❖ Presentation of the graph
▪ Possibilities: add text, modify the scale of the axes, change the appearance
(template), save your own template in order to reuse it, etc...
▪ These aesthetic enhancements are very practical when the graphs need to respond to
the same graphic charter for example.
▪ Let's put these possibilities into practice through several examples.
To generate the series of logarithms associated with the three series. In the main menu, do
Quick/Generate Series, then type in the calculation formula or enter in the line of
order (at the top right)
❖ Clouds of points
Let's visualize the two series Invest and GDP and then go to View/Graph/Scatter.
14
The scatter plot suggests a linear fit, with a more or less strong slope. There is
therefore a correlation between Investment and the GDP of the country BENI. We expect then that
the coefficient associated with these variables is significantly different from zero.
❖ Scatter plot of the inv and pib variables and plotting the linear regression line
900
800
700
600
500
400
300
200
100
1,000 2,000 3,000 4,000 5,000 6,000 7,000
gdp
15
2.3. Basic Statistics
❖ Click on a series, then:
▪ View/Descriptive Stats & Tests/Histogram and Stats
▪ View/Descriptive Stats & Tests/StatsTable
16
❖ Histogram
gdp
12
10
0
1,000 2,000 3,000 4,000 5,000 6,000 7,000
17
❖ Frequency polygon
INV
7
0
100 200 300 400 500 600 700 800 900 1,000
18
inv
1.0
0.8
0.6
0.4
0.2
0.0
200 300 400 500 600 700 800 900
1.0
0.8
0.6
0.4
0.2
0.0
200 300 400 500 600 700 800 900
19
❖ Graphs associated with a discrete quantitative character: Statistical table;
step curve
Example: Vaccine sales over the last 100 days are reported in the
table below:
0 1 2 3 4 5 6 0 1 3
0 1 2 3 4 5 6 1 1 3
0 1 2 3 4 5 0 2 2 1
0 1 2 3 4 5 0 3 3 2
0 1 2 3 4 1 2 3 2 3
0 1 2 3 4 1 2 1 1 2
0 1 2 3 4 1 2 2 1 1
0 1 2 3 4 1 2 0 1 2
0 1 2 3 4 1 2 1 1 2
0 1 2 3 3 1 2 2 2 3
➢ Statistical table
To do this, you need to transform the distribution into a column before importing it into
EVIEWS.
Then:
Click on Quick → Show →
Objects to display in a single window: Enter sales
OK
Click on View → One-Way Tabulation
OK
Tabulation of SALES
Sample: 1 100
Included observations: 100
Number of categories: 7
Value Count
0 14
1 27
2 26
3 18
4 9
5 4
6 2
Total 100
20
❖ staircase curve
1.0
0.8
0.6
0.4
0.2
0.0
0 1 2 3 4 5 6 7
21
Chapter 3: Econometric Estimation
( ) = 0+ 1 ( ) + 2 +
Note: As this concerns time series, we should normally perform the test of
stationarity for each variable.
22
❖ To do this, Click Quick → Series statistics → Unit Root Test → Enter X → OK
❖ Test type: Choose Phillips-Perron
❖ Test for unit root in: Choose level
❖ Include in test equation: Choose Trend and intercept
❖ Choose Newey-West Bandwidth
❖ OK
We first test the significance of the coefficient of the time variable.
@TREND("1972"), by the Student's method.
If the critical probability associated with the test is less than 5%, we reject the null hypothesis.
Thus, the coefficient associated with the time variable is significantly different from 0.
We keep the model with constant and trend. (to be done during the course)
The null hypothesis of the test is 'The variables are not correlated'. It will therefore be rejected if the
the associated critical probability is less than 5% (Conventional threshold). One can choose
other conventional thresholds (1% or 10% generally) taking into account the precision
sought after.
Instructions on Eviews:
▪ Click on 'Quick' then on 'Show' and enter the variables 'Invest GDP'
Click on 'Ok'.
▪ Then click on 'Views' and then on 'Covariance Analysis'
23
➢ We obtain the following result:
Only the probability associated with the correlation between Investment and GDP is zero. Therefore, we can reject.
the null hypothesis that investment and GDP are not correlated. Therefore,
The null hypothesis of the test is that the variable follows a normal distribution.
Instructions on Eviews:
▪ Click 'Quick' then 'Group Statistics' then 'Descriptive Statistics' then
Common Sample
▪ Enter the names of the three series in the 'Series List' window: Invest GDP Interest
▪ Finally click on 'OK'
24
All the critical probabilities associated with the Jarque-Bera statistic are greater than
conventional thresholds (1%, 5%, and 10%). Therefore, one cannot reject the hypothesis of normality.
for each of these variables.
4. Actual estimation
Before the estimation, it seems logical to generate log(Investment) and log(GDP) respectively. For this
enter the following instructions directly into the 'command' bar:
generate lpib = log (gdp)
25
Table 2: First Estimate
5. Tests on residues
Before any interpretation of the results, we will check the OLS assumptions on the
residuals to know: normality, homoscedasticity, and no autocorrelation.
26
The Jarque-Bera probability is greater than 5%. Therefore, we cannot reject the hypothesis.
according to which the residuals follow a normal distribution.
The two critically marked probabilities in yellow are greater than 5%: There is
homoscedasticity.
You can also perform the ARCH test to check for homoscedasticity.
Application conditions: time series, more than 15 observations and estimation with
constant.
It reads on the results of the OLS estimation of the production function that DW=1.149.
But Eviews does not provide the probability associated with this statistic.
27
5.3.2. Breusch-Godfrey Test
This test is based on a Fisher test of the nullity of the coefficients and allows testing a
autocorrelation of order greater than or equal to 1.
The probability values are less than 5%, so we reject the null hypothesis.
correlation of errors. The errors are autocorrelated to order 1.
When we repeat the test with lag 2, the residuals become uncorrelated. This would mean
that the residuals are correlated with order 1 and not with order 2.
28
We only look at "Partial correlation". Upon reading the correlogram (Partial
correlation) only the first bar comes out of the confidence interval frame. The second one does not.
sort past. Therefore, there is first-order autocorrelation.
Instructions on Eviews
➢ Click on "Quick" then on "Estimate Equation"
➢ Enter the following model:
Invest with ar(1) interest
➢ Always choose 'Least Squares' then 'Ok'.
In this case, we obtain:
29
Table 3: Estimation 2
We can visualize the residuals of the new estimated model. The first-order autocreation is therefore
corrected.
30
The model estimated in the second position by the Cochrane-Orcutt method is well specified.
because the probabilities marked in yellow are below 5%
8. Chow test on the second estimation
This is a Stability test. A natural question is that of the homogeneity of the parameters.
on two subpopulations. The null hypothesis is 'the model is stable.'
One can question the existence of a temporal break in behaviors. One can,
also, to ask oneself for example if the estimated investment behavior on series
Temporal is homogeneous over time or if the production technologies, estimated
on a panel of companies are homogeneous across sectors.
31
The result obtained is as follows:
The two probabilities are greater than 5%. The model estimated in second position by the
the Cochrane-Orcutt method is therefore stable
In other words, the empirical Fisher admits a probability exceeding the threshold: we reject
the null hypothesis of coefficient stability for the two concerned periods.
9. Interpretation of the coefficients of the model estimated in the second position by the method
Cochrane-Orcutt
This model indicates, in accordance with Keynesian theory, that the growth rate
economic is a function of education expensesdeped); investments (depinv)and
health expendituresdepsante).
32
For panel data, after importing, it is necessary to specify the model.
Hausman specification test
H0 = Presence of random effects
Presence of fixed effects
First, we estimate the random model
➢ Click on 'Quick' and then on 'Estimate Equation'
➢ Enter the following model: tcpib c deped depinv depsante
➢ Panel options→Cross-Section/ Random→OK
TCRPIB
Method: Panel EGLS (Cross-section random effects)
2003 2017
Periods included: 15
Cross-sections included: 5
Total panel (balanced) observations: 75
Swamy and Arora estimator of component variances
Effects Specification
S.D. Rho
Weighted Statistics
Unweighted Statistics
33
❖ View→Fixed/Random effects testing→Correlated Random effects-Hausman test
Chi-Square.
Test Summary Statistic Chi-Sq. d.f. Prob.
Effects Specification
The probability associated with the Hausman statistic is 0.1978, which is above the 5% threshold. Therefore H0
cannot be rejected. So there is the presence of random effects.
34
❖ Estimation of the selected model
According to the Hausman test, the model to be estimated is random effects.
TCRPIB
Method: Panel EGLS (Cross-section random effects)
Sample: 2003 2017
Periods included: 15
Cross-sections included: 5
Total panel (balanced) observations: 75
Swamy and Arora estimator of component variances
Effects Specification
S.D. Rho
Weighted Statistics
Unweighted Statistics
❖ Validity of the model: Normality test of the residuals and the autocorrelation test
of independence )
35
12
Series: Standardized Residuals
Sample 2003 2017
10
Observations 75
8 Mean 8.19e-16
Median 0.226679
6 Maximum 6.101348
Minimum -6.588122
Std. Dev. 2.036587
4
Skewness -0.214878
Kurtosis 3.877159
2
Jarque-Bera 2.981556
0 Probability 0.225197
-6 -4 -2 0 2 4 6
The probability associated with the Jarque-Bera statistic is 0.225197, which is above the 5% threshold.
So we cannot dismiss the hypothesis that the residuals follow a normal distribution.
The probability associated with the Breusch-Pagan statistic is 0.5891, which is greater than
5% threshold. Therefore, we cannot reject the hypothesis that the residuals are
independent.
Conclusion: The model is valid and we can interpret the estimated coefficients.
36