Professional Documents
Culture Documents
Week 1
Week 1
Semester 2, 2023/24
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 1 / 75
Course overview
Start recording!
Me: Dr. Yuejun Zhao
Textbook - Wooldridge, Introductory Econometrics: A Modern Approach, 7e
Part I - Topics in Time Series and Intro to Panel Data
Time series basics (chapters 10 & 11)
Serial correlation (chapter 12)
Stationary time series (chapter 18.1 and 18.5)
Nonstationary time series (chapter 18.2–18.4)
Diff-in-diff and first difference (chapter 13)
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 2 / 75
In this lecture
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 3 / 75
Types of Times Series Models
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 4 / 75
Types of Times Series Models Static models
yt = β0 + β1 zt + ut .
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 5 / 75
Types of Times Series Models Static models
inft = β0 + β1 unemt + ut ,
where inft is, say, the annual rate of inflation during year t, and unemt is annual
unemployment rate during year t. β1 is supposed to the measure the tradeoff
between inflation and unemployment.
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 6 / 75
Types of Times Series Models Static models
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 7 / 75
Types of Times Series Models FDL models
yt = α0 + δ0 zt + δ1 zt−1 + δ2 zt−2 + ut
Finite lags: 2.
Such models are good for estimating lagged effects of, say, policy.
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 8 / 75
Types of Times Series Models FDL models
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 9 / 75
Types of Times Series Models FDL models
A similar example
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 10 / 75
Types of Times Series Models FDL models
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 11 / 75
Types of Times Series Models FDL models
Lag distribution
With an FDL model, we are often interested in the shape of the lag
distribution, which is just the values of the δj . Of course, we will have to
eventually estimate the δj .
Unfortunately, the estimated lag distribution is often very jagged because the
lag coefficients are imprecisely estimated.
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 12 / 75
Types of Times Series Models FDL models
Impact propensity
With an FDL model, we can calculate something called the impact propensity.
Impact Propensity = δ0
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 14 / 75
Types of Times Series Models FDL models
With an FDL model, we can also compute something called the long run
propensity.
yt = α0 + δ0 zt + δ1 zt−1 + δ2 zt−2 + . . . + δq zt−q + ut
The sum of all lag coefficients – where we must make sure to keep the signs –
is the long run propensity (LRP).
The LRP gives us the answer to the following thought experiment. Suppose
the level of z increases permanently today. For example, the minimum wage
increases by $1.00 per hour and stays there. The LRP is the (ceteris paribus)
change in y after the change in z has passed through all q time periods.
If y and z are both in logs, the LRP is called the long run elasticity.
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 15 / 75
Types of Times Series Models FDL models
Notice that if z increases by one unit today, but then falls back to its original
level in the next period, the lag distribution tells us how y changes in each
future period. Eventually y falls back to its original level with a temporary
change in z.
With permanent change in z, y changes to a new level, and the change from
the old to the new level is the LRP.
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 16 / 75
Types of Times Series Models FDL models
An example of an LRP
We can plot the cumulative effect of changing z permanently (other factors
fixed) using the previous DL that was plotted. LRP = .3 + .4 + .1 = .8.
We can, of course, have more than one variable appear with multiple lags.
where inf t is the inflation rate and gdpgapt is the GDP gap (actual GDP - potential
GDP, measured as a percent). If the available data are usually quarterly, we
probably would try at least four lags.
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 18 / 75
Types of Times Series Models FDL models
FDLs are often more realistic than static models, and they can do better in
forecasting because they account for some dynamic behaviour.
But they are not usually the most preferred for forecasting because they do
not allow lagged outcomes on y to directly affect current outcomes.
Which brings us to...
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 19 / 75
Types of Times Series Models Models with lagged dependent variables
yt = β0 + β1 yt−1 + ut ,
which is a simple regression model for time series data where the explanatory
variable at time t is yt−1 .
Called an autoregressive model of order 1, or AR(1).
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 20 / 75
Types of Times Series Models Models with lagged dependent variables
Does AR(1) carry economic interpretations? This simple model typically does
not have much economic or policy interest because we are just using lagged y
to explain current y .
We can add even more lags of y to explain yt . (Each time we add a lag, we
lose an observation for estimating the parameters.)
Autoregressive models can be remarkably good at forecasting, even
compared with complicated economic models.
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 21 / 75
Types of Times Series Models Models with lagged dependent variables
It is easy to add other explanatory variables along with a lag. For example,
yt = β0 + β1 yt−1 + β2 zt + ut
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 22 / 75
Types of Times Series Models Models with lagged dependent variables
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 23 / 75
Types of Times Series Models Models with lagged dependent variables
Other extensions
Other extensions can be very useful for forecasting. For example, to forecast
inflation one period out, we include only lags of variables:
β0 + β1 inft + β2 unemt
(What about the error term? We cannot forecast the error term next period,
t + 1, so it is set to its mean value, zero.)
We have to estimate the βj first to make this operational.
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 24 / 75
Types of Times Series Models Models with lagged dependent variables
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 25 / 75
Finite-Sample Properties
Finite-Sample Analysis of
OLS for Time Series Data
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 26 / 75
Finite-Sample Properties
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 27 / 75
Finite-Sample Properties
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 28 / 75
Finite-Sample Properties
In practice, we ask whether ut is uncorrelated with each xsj for all t and s,
including t = s and all variables j = 1, . . . , k .
Assumption TS.3 is often called strict exogeneity of {xt : t = 1, . . . , n}.
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 29 / 75
Finite-Sample Properties
E(β̂j ) = βj , j = 0, . . . , k .
Notice that we get unbiasedness without restricting the correlation across time
in the explanatory variables. In other words, the {xtj } are allowed to be
correlated across time.
Further, the errors, {ut } are allowed to be correlated across time.
What we are ruling out with TS.3 is correlation between the errors in any time
periods and the explanatory variables in any time period.
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 30 / 75
Finite-Sample Properties
TS.4 Homoskedasticity
Of course, unbiasedness says nothing about how precise the OLS estimators
are, and it does not give us a way to test hypotheses or construct confidence
intervals.
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 31 / 75
Finite-Sample Properties
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 32 / 75
Finite-Sample Properties
x1 u1
x2 u2
.. ..
.
←− 2. correlation in xs , ut −→ .
1. correlation in xt 3. correlation in ut
TS.2, no perfect collinearity
xt
TS.3, zero conditional mean
ut TS.5, no serial correlation
.. ..
. .
xn un
TS.3’
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 33 / 75
Finite-Sample Properties
Assumptions TS.1 through TS.5 are the Gauss Markov assumptions for
time series data.
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 34 / 75
Finite-Sample Properties
TS.6 Normality
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 35 / 75
Finite-Sample Properties
However, the full set of CLM assumptions is often unrealistic for TS applications.
Strict exogeneity rules out some interesting cases such as autoregressive
models.
Serial correlation is often a problem, especially in static and FDL models.
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 36 / 75
Finite-Sample Properties
If we assume two lags of the FF rate suffice, we need not worry about
correlation between ut and further lags of ffrate.
But perhaps a positive shock to inflation at time t – that is, ut > 0 – leads the
Fed to increase ffrate the next period. Then ffratet+1 and ut are correlated,
violating strict exogeneity.
Fortunately, we can allow these situations when we examine large-sample
properties. But there are some additional complications there.
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 37 / 75
Finite-Sample Properties
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 38 / 75
Large-Sample Analysis for TS Data
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 39 / 75
Large-Sample Analysis for TS Data
The assumption of stationarity – that all joint distributions of the time series
process are constant across time – simplifies statements of the assumptions
but is not crucial.
The crucial assumption is weak dependence (topic 4).
For a series yt that follows
yt = ρyt−1 + ut ,
weak dependence means that |ρ| < 1.
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 40 / 75
Large-Sample Analysis for TS Data
This is the same linear-in-parameters model as usual, but we also restrict the
time series dependence in the data.
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 41 / 75
Large-Sample Analysis for TS Data
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 42 / 75
Large-Sample Analysis for TS Data
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 43 / 75
Large-Sample Analysis for TS Data
Has a similar flavor to the unbiasedness result, but two key points:
Unbiasedness required strict exogeneity but consistency does not.
Consistency assumes weak dependence whereas unbiasedness does not
(provided we have strict exogeneity).
The consistency result justifies models with lagged dependent variables and
other non-strictly exogenous variables. But we often have small time series
samples, especially with annual data.
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 44 / 75
Large-Sample Analysis for TS Data
TS.4′ Homoskedasticity
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 45 / 75
Large-Sample Analysis for TS Data
E(ut us |xt , xs ) = 0
This assumption is stated in its form that is needed to get useful results. But
when we go to evaluate it, we focus on the covariance without the
conditioning:
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 46 / 75
Large-Sample Analysis for TS Data
We can add lags of inf or further lags of ffrate to eliminate the serial
correlation.
We may end up with a model such as
The key point is this: we can include lagged y and possibly other variables; if
we have enough lags then there cannot be serial correlation.
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 47 / 75
Large-Sample Analysis for TS Data
The result of this is that we can use large-sample inference for regression with
time series like we do with cross section, where we have replaced random
sampling with the idea of weak dependence (to allow some, but not too much,
time series correlation).
In topic 2, we discuss what to do when there is serial correlation – Assumption
TS.5′ is violated – as that is an issue we did not need to confront with CS data.
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 48 / 75
Large-Sample Analysis for TS Data
Summary
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 49 / 75
Trends and Seasonality
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 50 / 75
Trends and Seasonality
Trending data
Many series tend to increase over time, at least on average. They typically
have up and down periods, but the overall trend is up. (An example is gross
domestic product.)
Other variables tend to decline over time (such as the rate of traffic fatalities).
Whether a series grows or shrinks over time, care needs to be in place
because we can find spurious (not genuine) relations among trending
variables that have nothing to do with each other.
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 51 / 75
Trends and Seasonality
Trend illustrated
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 52 / 75
Trends and Seasonality
yt = α0 + α1 t + et
E(et ) = 0 for all t
E(yt ) = α0 + α1 t
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 53 / 75
Trends and Seasonality
∆yt = yt − yt−1
∆yt = yt − yt−1
= (α0 + α1 t + et ) − (α0 + α1 (t − 1) + et−1 ) (1)
= α1 + ∆et
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 54 / 75
Trends and Seasonality
Interpreting α1
α1 = E(∆yt ) − E(∆et )
= E(∆yt ) for all t
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 55 / 75
Trends and Seasonality
Exponential trends
Other series are better approximated by exponential trends (population, imports).
For strictly positive variables – by far the leading case – we can capture an
exponential trend as
yt = exp(β0 + β1 t + et ),
where E(et ) = 0.
Taking logs gives
log(yt ) = β0 + β1 t + et
In other words, the log of the variable follows a linear trend.
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 57 / 75
Trends and Seasonality
Interpreting β1
If we set E(et ) and E(et−1 ) to zero, following the derivation in Eq. (1), we get
Remember that the change in the log approximates the average growth rate
(as a decimal). Therefore,
(yt − yt−1 )
β1 ≈ E
yt−1
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 58 / 75
Trends and Seasonality
yt = β0 + β1 xt1 + β2 xt2 + β3 t + ut , t = 1, 2, . . . , n
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 59 / 75
Trends and Seasonality
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 60 / 75
Trends and Seasonality
Let’s explore trends with an example. The data (TRAFFIC.DTA) are monthly
for 9 years for California, from 1981 to 1989 (108 observations).
. des totacc spdlaw beltlaw unem t
storage display value
variable name type format label variable label
------------------------------------------------------------------------
totacc float %9.0g statewide total accidents
spdlaw byte %9.0g =1 after 65 mph in effect
beltlaw byte %9.0g =1 after seatbelt law
unem float %9.0g state unemployment rate
t int %9.0g time trend
. sum totacc spdlaw beltlaw unem t
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
totacc | 108 42831.26 4608.328 32699 52971
spdlaw | 108 .2962963 .4587521 0 1
beltlaw | 108 .4444444 .4992206 0 1
unem | 108 7.200926 1.790134 4.3 11.9
t | 108 54.5 31.32092 1 108
totacc is total number of accidents in each month. The key policy variables
are spdlaw and beltlaw, binary indicators. spdlaw is one when the speed limit
was raised from 55 mph to 65 mph. beltlaw is 1 after a mandatory seat belt
law went into effect.
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 61 / 75
Trends and Seasonality
If we estimate
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 62 / 75
Trends and Seasonality
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 63 / 75
Trends and Seasonality
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 64 / 75
Trends and Seasonality
Now increasing the the speed limit from 55 to 65 appears to decrease total
accidents. The effect of the seat belt law is now smaller but still substantial
and statistically significant.
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 65 / 75
Trends and Seasonality
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 66 / 75
Trends and Seasonality
The time trend shows that, controlling for the unemployment rate and policy
changes, total accidents increase by about 0.135% per month, or 1.62% at an
annual rate. (How did we get 1.62%?*)
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 67 / 75
Trends and Seasonality
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 68 / 75
Trends and Seasonality
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 69 / 75
Trends and Seasonality
Introduction to seasonality
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 70 / 75
Trends and Seasonality
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 71 / 75
Trends and Seasonality
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 72 / 75
Trends and Seasonality
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 73 / 75
Trends and Seasonality
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 74 / 75
Trends and Seasonality
Applications of Econometrics Ch. 10 & 11. Time Series Basics Semester 2, 2023/24 75 / 75