1. Advanced econometrics and Stata
L9-10 Time series
Dr. Chunxia Jiang
Business School, University of Aberdeen, UK
Beijing , 17-26 Nov 2019
2. Schedule
10月17日 Evening —
L1-2 Introduction to Econometrics and Stata
10月18日 Evening —
L3-4 Data, single regression
Morning —
L5-6 (1) Hypothesis testing, Multi-regression ,
Afternoon L5-6 (2) Violation of assumptions
Morning —
L7-8 Panel data models & Endogeneity
Evening Exercises and practice
Morning —
L9-10 Time series models
Afternoon L11-12 Frontier1 SFA & practice
10月24 Evening L13-14: Frontier2 DEA & practice
10月25日 Evening L15-16 DID & practice
Morning Revision
Afternoon Exam
10月20日
10月19日
10月22日
10月26日
3. Review: panel data models
Simplest case Adding the
impact of
unknown
factors that vary
over time
Allowing
different effects
at different
points in time
Accounting for
the impact of
unknown
individual
characteristics
Accounting for
the impact of
unknown
individual
characteristics
Pooled OLS Pooled OLS Pooled OLS Least Squares
Dummy
Variables
Fixed Effect
Estimator/
Random Effect
Estimator/First
Difference
Time dummies Time dummies Time dummies Time dummies
Interaction
between
variables and
time dummies
Individual (cross-
sectional)
dummies
3
4. Serial correlation (also called autocorrelation)
The nature of autocorrelation
The theoretical and practical consequences of autocorrelation
How to detect if there is autocorrelation since et is
unobservable
How to remedy the problem of autocorrelation
Stationary and non-stationary
DF test
Time series econometrics
5. There is no correlation between two error terms (no
autocorrelation).
OLS assumes no serial correlation
ui and uj are independent for all i j . i and j are two
observations over time or two cross sectional
observations
With time series data this assumptions is very
often violated, and then we have
autocorrelation.
Assumptions of the CLRM
0
)
,
,
(
j
i
j
i X
X
u
u
E
0
)
,
(
j
i u
u
E
6. Autocorrelation and serial correlation
Some authors prefer to distinguish two
Autocorrelation: lag correlation of a given series with
itself, lagged by a number of time units
Serial correlation: lag correlation between two different
series
8. Residuals
When use this type of data in our analysis,
residuals are likely to be serially correlated
If we plot the residuals over time we will
observe a clear pattern
If we do a cross plot of the residuals at time t
and the residuals at time t-1 (lagged) we can
find out clearly whether there is relationship
between the two series
9. What do we mean by lagged residual?
Year residuals Reisduals(t-1)
1950 0.70
1951 0.80 0.70
1952 0.52 0.80
1953 0.43 0.52
1954 0.54 0.43
1955 -0.36 0.54
1956 0.24 -0.36
1957 0.33 0.24
1958 0.43 0.33
1959 0.33 0.43
1960 0.43 0.33
1961 0.33 0.43
1962 0.53 0.33
1963 0.23 0.53
1964 0.23 0.23
1965 0.33 0.23
11. Negative Autocorrelation
Negative autocorrelation is indicated by an alternating pattern where
the residuals cross the time axis more frequently than if they were
distributed randomly
+
-
-
t
û
+
1
ˆ
t
u
+
-
t
û
Time
Ut-1
12. No pattern in residuals – No autocorrelation
No pattern in residuals at all: this is what
we would like to see
+
t
û
-
-
+
1
ˆ
t
u
+
-
t
û
Time
Ut-1
14. Model for the demand for ice cream
Let’s assume that we try to explain the
demand for ice cream using price and income
as our explanatory variables:
IceCreamt = α + β1pricet + β2incomet + ut
If we now plot the actual and fitted values we
obtain the following picture:
17. Serial correlation
iid
u
u
u
x
y
t
t
t
t
t
t
t
1
1
1
1
We estimate this model
But the errors are not independent,
Rho is the coefficient of autocovariance
White noise errors: their expected value = 0
they have constant variance
they are not serially correlated
t
t
t u
u
1
First order autoregressive
Process or AR(1) error model
Rho can be
interpreted as the
first order
coefficient of
autocorrelation
18. Rho
Rho can be interpreted as the first order coefficient
of autocorrelation
Rho is a constant between -1 and +1, under AR(1)
scheme, the variance of u is still homoscedastic
The absolute value of rho is less than 1 the AR(1)
scheme above is stationary the mean, variance,
and covariance of u do not change over time
if equals 1, the variance and covariance of residual are
not defined
t
t
t u
u
1 1
1
19. How serial correlation affects OLS
estimation
Similar to heteroscedasticity problem, in the
presence of serial correlation, OLS coefficient
estimates are unbiased, but inefficient (they do not
have minimum variance compared to procedures
that take into account autocorrelation).
Statistical inference is seriously affected:
estimated standard errors are biased. Usually these are
biased downwards (smaller than the true standard errors),
therefore the t static is upward biased.
F and t statistics are not reliable
R2 is unreliable as the residual variance is likely to be biased
downwards overestimate R-square
20. How to detect the presence of serial
correlation
Durbin Watson test for first-order autoregressive error,
based on the computation of the following statistic:
This is also called ‘d’ statistics or DW statistics: the ratio
of the sum of squared differences in successive
residuals to the RSS
T
t
t
T
t
t
t
u
u
u
DW
1
2
2
2
1
ˆ
)
ˆ
ˆ
(
)
ˆ
1
(
2
RSS
21. Durbin Watson test
Easy to compute, but there are some important
assumptions underlying the test:
The regression model has an intercept term
Xs are fixed in repeated sampling.
The regression does not contain lagged values of the
dependent variable
The residuals are characterised by first order serial
correlation AR(1). If not, cannot use DW
The error term ut is assumed to be normally distributed
No missing observations in the data
22. Detecting Serial Correlation
The null hypothesis:
H0: there is no autocorrelation
The alternative hypothesis:
H1: there is evidence of autocorrelation
d lies between 0 and 4 d
d = 2 implies residuals uncorrelated
As a rule of thumb, if d is close to 2, we do not reject the
null hypothesis we “accept” the null hypothesis
D-W provide upper and lower bounds for d
if d < dL then reject null of no serial correlation
if d > dU then reject null hypothesis of no serial correlation
if dL< d < dU then test is inconclusive
)
ˆ
1
(
2
23. Durbin Watson test
This test is always included in your regression output.
Run OLS regression, Check the value for d (or DW)
The closer d is to 0, the greater the evidence of positive serial
correlation
The closer d is to 4, the greater the evidence of negative serial
correlation
Find the critical dL and du from the Durbin Watson
tables for the given sample size and the given number
of explanatory variables
Follow the decision rules as in the following table:
24. The Durbin-Watson Test: Interpreting the
Results
The inconclusive zone narrows as the sample size increases
Conditions which Must be Fulfilled for DW to be a Valid Test
1. Constant term in regression
2. Regressors are non-stochastic
3. No lags of dependent variable
26. Example
Regressing real wages on productivity, we obtain the following
results:
Realwages= 29.575 + 0.701Productivity
se (1.461) (0.017)
R2 = 0.976
DW = 0.214
d=0.214,
No. of observations: 44
No. of explanatory variables: 1
From the Durbin Watson tables (5% significance level): dL=1.475,
du=1.566
d<dL :There is evidence of positive serial correlation.
27. What can we do about first order
serial correlation?
Four options:
Find out if the autocorrelation is pure autocorrelation
and not the result of mis-specification of the model, i.e.
excluding some important variables.
If it is pure autocorrelation appropriate
transformation. GLS method
In large samples, use Newey-West method to obtain
standard errors of OLS estimator that are corrected for
autocorrelation
Some situations, we can use the OLS method
28. What if the model contains the lagged
dependent variable?
t
t
t
t u
x
y
y
2
1
1
Savings Lagged savings Income
The d statistics in these models is biased towards 2 so there is a bias against
discovering first order serial correlation
The inclusion of lagged dependent variables causes a problem of higher
Order Serial correlation.
29. How to detect the presence of serial
correlation
The Breusch-Godfrey LM (Lagrange Multiplier)
test of higher-order autocorrelation
Suppose the disturbance term et is generated by
the following pth-order autoregressive process,
AR(p):
where vt is purely random disturbance term with
zero mean and constant variance.
(7)
v
e
ρ
.
.
.
e
ρ
e
ρ
e t
p
t
p
2
t
2
1
t
1
t
30. Breusch and Godfrey test
The null hypothesis: all the coefficients in (7) are equal to zero.
The alternative hypothesis: at least one of the coefficients is not
equal to zero.
The null hypothesis can be tested as follows:
Estimate the original regression (OLS) to obtain .
Regress on all the regressors (X’s) and the terms in (7). For
example, if the original model has only one X variable, we run the
following auxiliary regression to obtain R2:
If the sample size is large, then
If the calculated value is greater than the critical value of chi-square,
we reject the hypothesis that there is no serial correlation.
t
ê
t
ê
(7a)
v
e
ρ
.
.
.
e
ρ
e
ρ
X
ê t
p
t
p
2
t
2
1
t
1
2t
2
1
t
2
2
)
( p
R
p
n
31. Correcting for Higher Order Serial
Correlation
No easy answer
Typically indicative of a mis-specification of
original equation
Often due to omitted lags of explained and/or
explanatory variables (i.e. misspecified dynamics)
Try including more lags of the variables currently in the
equation or (lags of) new variables
Can use Newey-West std errors to account for
serial correlation