Chapter -6-Time Series Analysis [Compatibility Mode]
Chapter -6-Time Series Analysis [Compatibility Mode]
Prof)
[email protected]
AAU, 2024
6.1. Introduction
Time series analysis comprises methods for analyzing
time series data in order to extract meaningful statistics
and other characteristics of the data.
By: Teklebirhan A. 2
Cont…
By: Teklebirhan A. 3
Cont…
Note that almost all of the above problems arise mainly due to
non-stationarity of time series data sets.
By: Teklebirhan A. 4
6.2 The Nature of Time Series Data
An obvious characteristic of time series data which
distinguishes it from cross-sectional data is that a time series
data set comes with a temporal ordering.
By: Teklebirhan A. 5
Cont…
For example, today
By: Teklebirhan A. 6
Table 5.1: Time series Data on some macroeconomic variables in Ethiopia
Year TB MS2 GDP EXR G
1963 0.69 629.6 9,400 2.4000 303.99
1964 0.69 658.3 9,873 2.3000 316.19
1965 1.04 808 9,892 2.1900 348.14
1966 1.15 1066.6 10,353 2.0700 368.57
1967 0.71 1139.4 11,412 2.0700 442.89
1968 0.79 1421.8 11,145 2.0700 551.99
1969 0.86 1467.9 11,916 2.0700 654.73
1970 0.84 1682.2 13,221 2.0700 752.34
1971 0.61 1848 13,890 2.0700 942.56
1972 0.65 2053.2 15,143 2.0700 993.59
1973 0.62 2377.6 16,135 2.0700 1,017.56
1974 0.47 2643.7 16,530 2.0700 1,090.74
1975 0.29 3040.5 17,498 2.0700 1,244.54
1976 0.45 3383.7 19,655 2.0700 1,506.13
1977 0.42 3849 17,865 2.0700 1,454.12
1978 0.43 4448.2 21,517 2.0700 1,524.52
1979 0.36 4808.7 22,367 2.0700 1,636.04
1980 0.34 5238.7 23,679 2.0700 1,726.70
By: Teklebirhan A. 7
Cont…
A sequence of random variables indexed by time is called a
stochastic process or a time series process. (“Stochastic” is a
synonym for random).
By: Teklebirhan A. 8
6.3. Trends and Seasonality
Trend component of time series:
A trend exists when there is a long-term increase or decrease
value in the series (data).
By: Teklebirhan A. 9
Cont…
In a nutshell, a deterministic trend is a nonrandom function
of time whereas a stochastic trend is random and varies over
time.
By: Teklebirhan A. 10
Cont…
Therefore, our treatment of trends in economic time series
focuses mainly on stochastic rather than deterministic trends,
and when we refer to “trends” in time series data, we mean
stochastic trends.
By: Teklebirhan A. 11
Cont…
Seasonality component of time series :
A seasonal pattern occurs when a time series is affected by
seasonal factors such as the time of the year or the day of the
week.
However, a cycle occurs when the data exhibit rises and falls
that are not of a fixed frequency.
By: Teklebirhan A. 12
Cont…
By: Teklebirhan A. 13
6.4. Stationary and Non-stationary
Stochastic Processes
A type of stochastic process that has received a great deal of
attention by time series analysts is the so-called stationary
stochastic process.
By: Teklebirhan A. 14
Cont…
By: Teklebirhan A. 15
Cont…
In short, if a time series is stationary, its mean, variance, and
auto-covariance (at various lags) remain the same no matter at
what point we measure them; that is, they are time invariant.
By: Teklebirhan A. 16
Cont…
Why are stationary time series so important? b/c
By: Teklebirhan A. 17
Examples
G GDP
60,000 600,000
50,000 500,000
40,000 400,000
30,000 300,000
20,000 200,000
10,000
100,000
0
0
1965 1970 1975 1980 1985 1990 1995 2000
1965 1970 1975 1980 1985 1990 1995 2000
TB MS2
1.2 160,000
140,000
1.0
120,000
0.8 100,000
0.6 80,000
60,000
0.4
40,000
0.2 20,000
0.0 0
1965 1970 1975 1980 1985 1990 1995 2000 1965 1970 1975 1980 1985 1990 1995 2000
By: Teklebirhan A. 18
Cont…
If we depend on common sense, it would seem that the time
series depicted in the above four figures are non-stationary,
at least in the mean values.
By: Teklebirhan A. 20
Cont…
By: Teklebirhan A. 21
Cont…
By: Teklebirhan A. 22
Cont…
By: Teklebirhan A. 23
Cont…
By: Teklebirhan A. 24
Cont…
By: Teklebirhan A. 25
Cont…
By: Teklebirhan A. 26
Cont…
In short, RWM with or without drift, is a non-stationary
stochastic process.
By: Teklebirhan A. 27
6.5. Test of Stationarity of Time Series Data
One of the most important preliminary steps in regression
analysis is to uncover the characteristics of the data used in
the analysis.
a) Graphical analysis,
b) Correlogram, and
Such a plot gives an initial clue about the likely nature of the
time series.
• You will see that over the period of study, trade balance
has been declining, that is, showing a downward trend,
suggesting perhaps that the mean of the TB has been
changing. By: Teklebirhan A. 30
Cont…
This perhaps suggests that the TB series is not stationary.
By: Teklebirhan A. 31
Cont…
By: Teklebirhan A. 32
Cont…
By: Teklebirhan A. 33
Cont…
By: Teklebirhan A. 34
Cont…
By: Teklebirhan A. 35
Cont…
By: Teklebirhan A. 36
Cont…
Given a correlogram, if the value of ACF is close to zero from
above or below, the data are said to be stationary. (i.e., the
autocorrelation coefficient is statistically insignificant).
By: Teklebirhan A. 37
Cont…
By: Teklebirhan A. 38
Cont…
C) The Unit Root Test (Augmented Ducky –Fuller Test)
A test of Stationarity or non-stationarity that has become widely
popular over the past several years is the unit root test.
But here our focus shall be to see how the ADF unit Root Test
can be implemented.
By: Teklebirhan A. 39
Cont…
The ADF test statistic is the ‘t’ statistic for the lagged
dependent variable. ADF statistic is a negative number and
more negative ADF test statistic is the stronger the rejection of
the hypothesis that there is a unit root.
By: Teklebirhan A. 41
Cont…
Null Hypothes is : LEXR has a unit root
Exogenous : Cons tant
Lag Length: 1 (Autom atic - bas ed on SIC, maxlag=9)
All the above test results showed that the data sets are non-
stationary. The test statistics is lower than the critical values.
By: Teklebirhan A. 42
Cont…
Transforming Non-stationary Time Series
By: Teklebirhan A. 43
Cont…
Here, we will focus on DSP since most macroeconomic time
series are DSP rather than TSP
By: Teklebirhan A. 44
Cont…
Null Hypothes is : D(LTB) has a unit root
Exogenous : Cons tant
Lag Length: 0 (Automatic - bas ed on SIC, m axlag=9)
t-Statistic Prob.*
DLTB
.6
.4
.2
.0
-.2
-.4
-.6
1965 1970 1975 1980 1985 1990 1995 2000
By: Teklebirhan A. 45
Cont…
Null Hypothes is : D(LMS2) has a unit root
Exogenous: Constant
Lag Length: 0 (Automatic - bas ed on SIC, maxlag=9)
t-Statistic Prob.*
By: Teklebirhan A. 46
Cont…
In general, the above test results revealed that Trade balance
(TB), log of money supply (LMS2), and exchange rate data
(EX) became stationary at first difference. In all the above test
results, the null hypothesis of Unit Root is rejected.
By: Teklebirhan A. 47
Cont…
Table: 1: ADF Unit Root Test Results
By: Teklebirhan A. 48
6.6. What next after unit root testing?
The outcome of unit root testing matters for the empirical model to
be estimated.
The following cases explain the implications of unit root testing for
further analysis.
CASE 1: Series in the model under examination are stationary.
What if all the time series under consideration are stationary?
Technically speaking, we mean they are I(0) series (integrated
of order zero).
One special feature of these series is that they are of the same
order of integration, I(1).
Note that both long run and short run models must be
estimated when there is cointegration.
By: Teklebirhan A. 54
Cont…
By: Teklebirhan A. 55
Cont…
By: Teklebirhan A. 56
Cont…
Click OK, to obtain the following Long Run Regression Result
(Determinants of Trade Balance of Ethiopia in the Long Run)
By: Teklebirhan A. 57
Cont…
2) Save/Rename the residuals obtained from the above
regression
By: Teklebirhan A. 58
Cont…
3) Open the saved residual (i.e., RES) and perform ADF unit
root test to obtain:
By: Teklebirhan A. 59
Cont…
4) Decision based on Residuals ADF unit RootTest Result
Based on the above Result, we reject the null hypothesis of
Unit Root.
Thus, the residual series is stationary, i.e., the long
run equation is conintegrated.
I.e., the long run Model is not Spurious.
By: Teklebirhan A. 60
Cont…
The Short Run Model and Error Correction Mechanism
By: Teklebirhan A. 61
Cont…
By: Teklebirhan A. 62
Cont…
By: Teklebirhan A. 63
Cont…
Then, click OK/to see Vector Autoregression Estimates/View/Lag
Structure/Lag Length Criteria/check maximum lags to
include/OK you will see the selected Lag Length as follows:
By: Teklebirhan A. 64
Cont…
2) Rename the residual obtained from the long run/static
model as ECT for convenience.
By: Teklebirhan A. 65
Cont…
3) Then, Click Quick/Estimate Equation and specify the error
By: Teklebirhan A. 66
Cont…
4) Click OK to obtain the following result
(Short Run Determinants of the Trade Balance of Ethiopia)
By: Teklebirhan A. 67
Cont…
The coefficient of the error-correction term of about -0.89
suggests that about 89% of the discrepancy between long-
term and short-term Trade Balance is corrected within a year
(yearly data), suggesting a high rate of adjustment to
equilibrium.
By: Teklebirhan A. 68
Cont…
Post Estimation Tests
This requires verifying whether the estimates from the error
correction model are reliable.
By: Teklebirhan A. 69
Cont…
A) Autocorrelation Test
The Breusch-Godfrey LM test is one of the prominent tests.
The null hypothesis is that there is no serial correlation.
Using EViews, Estimate the short run model/View
/Residual Diagnostics/ Serial Correlation LM test/ click
OK on the Lags Specification box and the serial correlation test
results would appear as follows:
Both the F & Chi2 probability values are insignificant, so the model is
free from autocorrelation.
By: Teklebirhan A. 70
Cont…
B) Ramsey Reset Test
The null hypothesis is that the model is correctly specified.
To test this hypothesisEstimate the short run
model/View/Stability Diagnostics/Ramsey Reset Test to
obtain:
By: Teklebirhan A. 71
Cont…
C) Normality Test
To perform the test, select View/Residual Diagnostic
/Histogram Normality-Test, the following result will appear:
By: Teklebirhan A. 73
6.8. Autoregressive Distributed Lag
(ARDL(p,q)) Models
Autoregressive distributed lag models:
models that contain the lagged values of the dependent variable,
the current and lagged values of regressors as explanatory
variables.
By: Teklebirhan A. 74
Cont…
By: Teklebirhan A. 75
Cont…
By: Teklebirhan A. 76
Cont…
By: Teklebirhan A. 77
Cont…
By: Teklebirhan A. 78
Cont…
By: Teklebirhan A. 79
(ARDL(p,q)) Using EViews
The relevant steps are :
Step 1: Specification of the model in static form
Click on Quick on the Menu bar and select Estimate Equation
Specification Window.
Step 2: Choose the appropriate estimation technique
Click on the drop-down button in front of Methods under the
By: Teklebirhan A. 80
Cont…
Step-3: Optimal Lag Length Selection Criterion
The lag structure of the ARDL model specification was
determined by Schwarz Criterion (SIC) since it controls the
problems of autocorrelation and it is also advantageous for small
sample size.
By: Teklebirhan A. 81
Cont…
By: Teklebirhan A. 82
Cont…
Step -4: Estimate the model based on Steps 1 to 4 (i.e., click Ok
in the above dialog box), to obtain:
Dependent Variable: LTB
Method: ARDL
Date: 12/23/23 Tim e: 08:40
Sam ple (adjus ted): 1964 2003
Included obs ervations : 40 after adjus tm ents
Maxim um dependent lags : 4 (Autom atic s election)
Model s election m ethod: Schwarz criterion (SIC)
Dynam ic regres s ors (4 lags , autom atic): LMS2 LGDP LG LEXR
Fixed regres s ors : C @TREND
Num ber of m odels evalulated: 2500
Selected Model: ARDL(1, 0, 0, 0, 0)
Note: final equation s am ple is larger than s election s am ple
*Note: p-values and any s ubs equent tes ts do not account for m odel
s election.
By: Teklebirhan A. 83
Cont…
Based on this selection order criteria, the optimal lags of each
variable in the model is (1, 0, 0, 0, 0) .
As the graph shows the model is strong since the lower the
value is the better the model is.
By: Teklebirhan A. 84
Cont…
By: Teklebirhan A. 85
Cont…
Step-5: Co-Integration Test: Using Bounded Test Approach
In order to determine the possible presence of co integration
thus a long-run equilibrium among the variables the study
adopts the bounds testing approach within the ARDL
framework to test for co-integration.
By: Teklebirhan A. 87
Cont…
As can be seen from the test result above, the F-statistic is
higher than the upper bounds test critical value even at 1%
level of significance.
By: Teklebirhan A. 88
Cont…
Step-6: Estimate the long run model
Click on View on the Menu Bar
Click on Coefficient Diagnostics
Select the Cointegration and Long Run Form option
By: Teklebirhan A. 89
.
Cont…
Step-7: Diagnostic Tests for ARDL
By: Teklebirhan A. 92
Cont…
Both the F & Chi2 probability values are insignificant, so the model is
free from autocorrelation.-
By: Teklebirhan A. 93
Cont…
B) Ramsey Reset Test
The null hypothesis is that the model is correctly specified.
To test this hypothesisEstimate the short run
model/View/Stability Diagnostics/Ramsey Reset Test to
obtain:
By: Teklebirhan A. 94
Cont…
The null hypothesis that the model is correctly specified
cannot be rejected since the test statistics (t-statistic, f-statistic
and likelihood ratio statistic) are all statistically insignificant.
C) Normality Test
Toperform the test, select View/Residual Diagnostic
/Histogram Normality-Test, the following result will appear:
By: Teklebirhan A. 95
Cont…
8
Series: Residuals
7 Sample 1964 2003
Observations 40
6
Mean -1.11e-15
5 Median 0.011891
Maximum 0.359708
4 Minimum -0.506750
Std. Dev. 0.166802
3 Skewness -0.495783
Kurtosis 3.982793
2
Jarque-Bera 3.248472
1 Probability 0.197062
0
-0.5 -0.4 -0.3 -0.2 -0.1 0.0 0.1 0.2 0.3 0.4
By: Teklebirhan A. 97
Cont…
E) Model stability Test
By: Teklebirhan A. 99
Cont…
CUSUM TEST
20
15
10
-5
-10
-15
-20
72 74 76 78 80 82 84 86 88 90 92 94 96 98 00 02
CUSUM 5% Significance
As can be seen from the first figure, the plot of CUSUM test
did not cross the critical limits. Thus, the result shows our
model is stable. By: Teklebirhan A. 100
Cont…
CUSUM SQUARED TEST
1.4
1.2
1.0
0.8
0.6
0.4
0.2
0.0
-0.2
-0.4
72 74 76 78 80 82 84 86 88 90 92 94 96 98 00 02
However, the CUSUMSQ test shows that the graphs cross the
lower and upper critical limits. Thus, the result shows our
model is not stable. By: Teklebirhan A. 101
The End!
Thank You!
“Education without values, as useful as it
is, seems rather to make man a more
clever devil.” ― C.S. Lewis