Instant PDF download, name-and-email checkout. Complete Book Bundle: every Economics, Statistics, Mathematics and Econometrics book
Econometrics guide, Unit 5, step 17 of 20Previous stepNext step

Step 17: Time Series Regression

SyllabusUndergraduate econometrics · Wooldridge, Introductory Econometrics, Ch. 10
In 30 seconds
  • Time series are ordered, dependent (today depends on yesterday) and observed at a fixed frequency. Random sampling no longer holds, so the assumptions must be stated explicitly. Always plot the data first.
  • \( 100\,\Delta\log y_t \) is, to a very good approximation, the percentage growth rate. US real GDP grew 0.776% a quarter on average from 1959 to 2009, about 3.1% a year.
  • A finite distributed lag model spreads the effect of \( z \) over time. The impact multiplier is \( \delta_0 \); the long-run propensity is \( \sum \delta_j \). For US consumption growth on income growth: impact 0.343, long run 0.744.
  • Two trending series always look related. In simulated data where advertising has no effect, a naive regression says each $1 million of advertising brings $9.67 million of sales; once a trend and month dummies are added, the effect is 0.094 and insignificant.
  • Exam point: a lagged dependent variable always breaks strict exogeneity, so OLS is biased in small samples, though it can still be consistent.
Video lesson coming soonA short animated lesson for this step will appear here.

What you will learn

  • what makes time-series data different from a cross-section;
  • how to build lags, differences and growth rates, and why log differences are growth rates;
  • how to estimate a distributed lag model and interpret the impact multiplier and long-run propensity, with a standard error;
  • the assumptions TS.1–TS.6, strict exogeneity, and why feedback breaks it;
  • how trends create spurious regressions, and how a time trend works (the Frisch–Waugh view);
  • how to model seasonality with dummies, deseasonalise a series and spot \( R^2 \) inflation;
  • how to estimate and use an AR(1) model.

What makes time series different

Key termA time series is a sequence of observations on one unit (a country, a firm, a market) at successive, usually equally spaced, dates. The frequency is how often it is observed: annual, quarterly, monthly, weekly or daily. Observations are indexed \( t = 1, 2, \dots, T \).
Econometrics Made Simple textbook coverChapter 17 of Econometrics Made Simple covers this in full: lags, distributed lag models, trends, seasonality and the AR(1), on real US data.Get the textbook · $15

Three features separate a time series from the cross-sections of earlier steps. Ordering: in a cross-section you could shuffle the rows and nothing would change; in a time series the order is information. Dependence: if unemployment is 9% this quarter it will not be 4% next quarter, so each observation is not a fresh draw but one value on the single path history produced. That is why the errors of time-series regressions are so often autocorrelated (Step 12). Frequency and calendar effects: monthly and quarterly data keep patterns such as the December jump in retail spending, which must be modelled or removed. More frequent data also give more observations, but not necessarily more information about slow-moving relationships: 156 months is still only 13 years.

The book uses three datasets here: real quarterly US macroeconomic data, 1959Q1–2009Q3 (us_macro.csv, 203 quarters), and two simulated files, annual consumption data and monthly retail sales for 2012–2024 (156 months).

Common mistakeRunning a regression on two time series without plotting them. If both lines rise over time, the regression will almost certainly show a “significant” relationship, whether or not one has anything to do with the other.

Lags, differences and growth rates

The first lag is \( y_{t-1} \), the value one period earlier; the first difference is \( \Delta y_t = y_t-y_{t-1} \); the growth rate is \( (y_t-y_{t-1})/y_{t-1} \), usually times 100. Creating a lag shifts the column down one row, so a model with \( q \) lags loses its first \( q \) observations. In pandas the tools are shift(1), diff() and pct_change(); in Stata, after tsset, the operators L., D. and F..

\[ \Delta \log y_t = \log y_t-\log y_{t-1} = \log\!\left(\frac{y_t}{y_{t-1}}\right) \approx \frac{y_t-y_{t-1}}{y_{t-1}}, \qquad 100\,\Delta\log y_t \approx \%\text{ growth} \]

The approximation comes from \( \log(1+g) \approx g \) for small \( g \). Log differences also add up over time, and treat rises and falls symmetrically. For the log scale more generally, see our post on interpreting log coefficients.

Worked example

US real GDP was $2,710.349 billion in 1959Q1 and $2,778.801 billion in 1959Q2. Find the exact and log-difference quarterly growth rates, and convert each to an annual rate.

Step 1Exact: \( 100 \times 68.452/2710.349 = 2.526\% \).
Step 2Log difference: \( 100 \times [\log 2778.801-\log 2710.349] = 2.494\% \).
Step 3Annualise the exact rate by compounding: \( 100[(1.02526)^4-1] = 10.49\% \).
Step 4With logs, multiply by four: \( 4 \times 2.494 = 9.98 \) log points, and \( 100(e^{0.0998}-1) = 10.49\% \), the same answer.

Reporting \( 4 \times 2.526 = 10.1\% \) mixes the two methods and is slightly wrong. Over the whole sample the exact and log growth rates never differ by more than 0.075 percentage points.

US real GDP growth, quarterly, 1959Q2 to 2009Q3 100 × Δlog(real GDP)
Growth quarterFalling quarter
196019701980199020002010-3-2-101234% per quartermean 0.776%
Figure 1. Taking log differences removes the trend in real GDP: growth fluctuates around a stable mean of 0.776% a quarter, and recessions show up as runs of coral bars. The worst quarter is 1980Q2 (−2.071%) and the best 1978Q2 (+3.859%). Data: us_macro.csv (real US data), Chapter 17.
Exam tipState the units of every growth rate: “0.78% per quarter” and “3.1% per year” are very different claims. When you regress one growth rate on another, the slope is in percentage points per percentage point.

Static and finite distributed lag models

A static model, \( y_t = \beta_0 + \beta_1 z_t + u_t \), assumes a change in \( z \) has its full effect at once and none afterwards. Households, though, may take several quarters to adjust their spending to a change in income.

Key termA finite distributed lag (FDL) model of order \( q \) is \( y_t = \alpha_0 + \delta_0 z_t + \delta_1 z_{t-1} + \dots + \delta_q z_{t-q} + u_t \). The impact multiplier is \( \delta_0 \), the immediate effect of a one-unit rise in \( z \). The long-run propensity is \( \text{LRP} = \delta_0 + \delta_1 + \dots + \delta_q \), the eventual effect of a permanent one-unit rise.

Two thought experiments make the coefficients concrete. If \( z \) rises by one unit for one period only, \( y \) rises by \( \delta_0 \), then \( \delta_1 \), and so on, back to normal after \( q \) periods: the sequence is the lag distribution. If \( z \) rises and stays higher, the effects accumulate: \( \delta_0 \), then \( \delta_0 + \delta_1 \), and from period \( q \) onwards the LRP.

The book estimates an FDL with four lags of quarterly income growth on the real US data, where \( gc_t \) and \( gy_t \) are 100 times the log differences of real consumption and real disposable income (198 quarters):

\[ \widehat{gc}_t = 0.218 + 0.343\,gy_t + 0.237\,gy_{t-1} + 0.068\,gy_{t-2} + 0.098\,gy_{t-3}-0.002\,gy_{t-4}, \qquad R^2 = 0.314 \]
Lag distribution: consumption growth on income growth effect by quarters after the change
Lag coefficient δRunning total (cumulative effect)
01234-0.10.00.10.20.30.40.50.60.70.80.90.3430.2370.0680.098-0.002LRP 0.744
Figure 2. Bars are the estimated lag coefficients of the four-lag distributed lag model; the line is their running total, which ends at the long-run propensity of 0.744. The impact effect (0.343) is less than half of the total. US quarterly data, 198 quarters, Chapter 17.

The impact multiplier is 0.343: in the quarter that income growth is a point higher, consumption growth is about a third of a point higher. But the first lag adds 0.237 (\( t = 5.02 \)) and the third 0.098 (\( t = 2.07 \)). The LRP is \( 0.343 + 0.237 + 0.068 + 0.098-0.002 = 0.744 \), more than twice the impact effect. The static model on the same quarters has a slope of 0.342 and \( R^2 = 0.194 \): it captures less than half of the total response.

Inference on the long-run propensity

Individual lag coefficients are often imprecise because \( z_t, z_{t-1}, z_{t-2}, \dots \) are highly correlated with each other (multicollinearity, Step 10). The LRP is usually better determined, but its standard error is not the sum of the individual ones:

\[ \operatorname{Var}(\widehat{\text{LRP}}) = \sum_j \operatorname{Var}(\hat\delta_j) + 2\sum_{j<k} \operatorname{Cov}(\hat\delta_j, \hat\delta_k) \]

Software does this for you: t_test in Python, lincom in Stata, or the quadratic form with vcov() in R. Here the standard error is 0.099, so \( t = 7.51 \) and the 95% interval runs from 0.549 to 0.940. The data reject both “no long-run effect” and “complete pass-through” (LRP = 1).

Common mistakeConcluding that a lag with an insignificant coefficient “does not matter”. Individual lag coefficients are noisy because the lags are highly correlated. Test the lags jointly with an F test (Step 7) and report the LRP with its standard error.

Assumptions for time-series regression

Let \( \mathbf{X} \) stand for the explanatory variables in all periods, past, present and future.

AssumptionWhat it says
TS.1 Linear in parameters\( y_t = \beta_0 + \beta_1 x_{t1} + \dots + \beta_k x_{tk} + u_t \); the \( x \)s may include lags or a trend.
TS.2 No perfect collinearityNo regressor is constant or an exact linear combination of the others.
TS.3 Strict exogeneity\( E(u_t \mid \mathbf{X}) = 0 \) for every \( t \): each error is unrelated to the regressors in every period.
TS.4 Homoskedasticity\( \operatorname{Var}(u_t \mid \mathbf{X}) = \sigma^2 \).
TS.5 No serial correlation\( \operatorname{Corr}(u_t, u_s \mid \mathbf{X}) = 0 \) for \( t \ne s \).
TS.6 NormalityThe \( u_t \) are independent of \( \mathbf{X} \) and \( N(0, \sigma^2) \).

The results mirror the cross-section case. Under TS.1–TS.3 OLS is unbiased; adding TS.4–TS.5 it is BLUE; adding TS.6, the usual t and F tests are exact. TS.3 is far stronger than it looks. It is not enough that \( u_t \) is unrelated to \( x_t \) (contemporaneous exogeneity). Feedback from \( y \) to future \( x \) breaks it: a city with a crime surprise this year hires more police next year; a firm whose sales disappoint raises its advertising budget. A simple check is to add the lead \( z_{t+1} \): under strict exogeneity it should not help explain \( y_t \).

In the consumption model the lead of income growth has a coefficient of 0.201 with \( t = 4.44 \). Either households anticipate income changes, as the permanent-income hypothesis predicts, or spending feeds back into income through the economy. Either way income growth is not strictly exogenous, and unbiasedness does not apply. All is not lost: under contemporaneous exogeneity and weak dependence, OLS is still consistent, which Step 18 explains.

Common mistakeTreating a lagged dependent variable as a harmless extra regressor. If \( y_{t-1} \) is a regressor, strict exogeneity always fails: \( u_t \) affects \( y_t \), which is a regressor in the equation for \( t+1 \). OLS is then biased in small samples, though it can still be consistent.
Econometrics Made Simple practice questions coverDrill growth rates, long-run propensities and seasonal dummies with graded questions. Over 1,150 practice questions, every one with a worked answer.Practice book · $9

Trends and spurious regression

Two series that both trend upwards will be strongly correlated in levels even if neither has anything to do with the other, simply because both are high late in the sample. Leaving the trend out is an omitted-variable problem: time affects \( y \) and is correlated with \( x \). A linear trend is \( y_t = \alpha_0 + \alpha_1 t + e_t \); an exponential trend, \( \log y_t = \alpha_0 + \alpha_1 t + e_t \), suits a series growing at a steady percentage rate, with \( 100\alpha_1 \) roughly the growth rate per period. For US real GDP the exponential trend has slope 0.00790 and \( R^2 = 0.994 \): about 0.79% a quarter.

The book’s simulated retailer shows how badly a trend can mislead. Advertising was built to have no effect on sales, but both series grow and the firm advertises more in its busy months. On its own, each extra $1 million of advertising is associated with $9.67 million more sales (standard error 0.529, \( R^2 = 0.684 \)). Adding a linear trend cuts this to 2.869.

Formula: the Frisch–Waugh view of detrendingThe coefficient on \( x \) in a regression of \( y \) on \( x \) and \( t \) equals the slope from regressing detrended \( y \) (residuals from \( y \) on \( t \)) on detrended \( x \). Including a trend means the slope is estimated only from movements around the trends. The book’s detrended regression gives exactly 2.869, with \( R^2 = 0.136 \), against 0.866 for the regression with the trend.

That gap is a warning about \( R^2 \): when \( y \) trends, most of the fit is the trend explaining the trend. Our post on R-squared vs adjusted R-squared explains why a high \( R^2 \) proves little on its own.

Seasonality and event dummies

Sales jump every December and dip in January and February. With monthly data and an intercept, include dummies for 11 of the 12 months; the omitted month (here January) is the base. Including all 12 is the dummy-variable trap of Step 9. The spring 2020 shop closures get an event dummy equal to 1 for March, April and May 2020.

\[ \text{sales}_t = \beta_0 + \beta_1 t + \gamma_2\,\text{feb}_t + \dots + \gamma_{12}\,\text{dec}_t + \lambda\,\text{covid}_t + u_t \]

The December effect dominates: \( \hat\gamma_{12} = 28.398 \) (standard error 1.175). At the same point on the trend, December sales are about $28.4 million higher than January’s, and \( 28.398-15.804 = 12.594 \) million higher than November’s. February is the weakest month (\( -3.013 \)). The trend is 0.444 a month, about $5.3 million a year, and sales in March–May 2020 were $20.355 million a month below normal.

Worked example

The full seasonal model has intercept 113.880 and trend 0.4442. Predict sales for December 2024 (\( t = 156 \)), where actual sales were 214.3, and for January 2025 (\( t = 157 \)). Then find the seasonally adjusted value of December 2024, given that the average of the twelve month effects (January = 0) is 8.295.

Step 1December 2024: \( 113.880 + 0.4442 \times 156 + 28.398 = 211.57 \). The actual 214.3 is 2.7 above it.
Step 2January 2025 is the base month, so no dummy: \( 113.880 + 0.4442 \times 157 = 183.62 \), a seasonal fall of about $28 million.
Step 3Deseasonalise: subtract December’s excess over an average month, \( 28.398-8.295 = 20.103 \).
Step 4\( 214.3-20.103 \approx 194.2 \).

By Frisch–Waugh, including month dummies is equivalent to deseasonalising every variable first, just as including \( t \) is equivalent to detrending.

ModelRegressors besides advertisingAdvertising coefficients.e.\( R^2 \)
(1)none9.6710.5290.684
(2)trend2.8690.5840.866
(3)trend, 11 month dummies−0.4170.3430.969
(4)trend, month dummies, covid dummy0.0940.2550.983

Once trend and seasonality are both controlled for, the advertising effect is gone. The impressive 9.671 was built from a common trend and a common seasonal cycle. Model (4) has \( R^2 = 0.983 \), yet when both series are detrended and deseasonalised, advertising explains just 0.1% of what remains. This is \( R^2 \) inflation. The residuals of model (4) are also still positively autocorrelated (about 0.47), so robust standard errors are needed before any formal test; the Durbin–Watson test is the classic first check.

Exam tipWhen asked to interpret a seasonal dummy, always name the base: “December sales are $28.4 million higher than January sales, holding the trend fixed.” Without the base the number means nothing.

A first dynamic model: AR(1)

Key termThe AR(1) model is \( y_t = \beta_0 + \beta_1 y_{t-1} + u_t \), where \( u_t \) is unpredictable from the past. \( \beta_1 \) measures persistence. If \( |\beta_1| < 1 \), shocks die out and the series fluctuates around the long-run mean \( \mu = \beta_0/(1-\beta_1) \).

For quarterly US GDP growth, \( \hat\beta_1 = 0.302 \) (standard error 0.067) and \( \hat\beta_0 = 0.533 \). The implied long-run mean is \( 0.533/(1-0.302) = 0.763\% \), close to the sample mean of 0.776%. Lagged growth explains only 9.3% of the variation in growth: most quarterly movements are unpredictable. Unemployment is very different: its AR(1) coefficient is 0.988 (standard error 0.017), extremely close to 1. A series with \( \beta_1 = 1 \) never returns to a fixed mean; it has a unit root, the subject of the next step.

Worked example

GDP growth in 2009Q3, the last quarter in the data, was 0.686%. Use the AR(1) estimates to forecast growth for 2009Q4.

Step 1\( \hat g_{2009Q4} = 0.533 + 0.302 \times 0.686 \).
Step 2\( = 0.533 + 0.207 = 0.740\% \).

The forecast is pulled towards the long-run mean of 0.763%. Forecasts further ahead approach the mean ever more closely; Step 19 adds forecast intervals.

Because \( y_{t-1} \) is a regressor, the AR(1) cannot satisfy strict exogeneity, and \( \hat\beta_1 \) is biased in small samples, typically downwards. But if \( |\beta_1| < 1 \) and the errors are not autocorrelated, OLS is consistent, and with 201 quarters the bias is small.

A checklist for a time-series regression(1) Plot every series against time. (2) Choose units: levels, logs, differences or growth rates. (3) Include a trend if any variable trends, and seasonal dummies for monthly or quarterly data that are not seasonally adjusted. (4) Think about timing: does \( x \) act with a lag, and is there feedback? (5) Use dummies only for events you can name. (6) Test the residuals for autocorrelation and use HAC standard errors if needed.

Practise: 6 questions

Try each one on paper first, then check the worked answer.

EasyQ1. A firm’s quarterly sales rise from 250 to 265. Find the exact percentage growth rate and the log-difference approximation. Show worked answer
Exact: \( 100 \times (265-250)/250 = 6.000\% \).
Log difference: \( 100 \times \ln(265/250) = 100 \times \ln 1.06 = 5.827\% \).
The approximation is slightly below the exact rate; the gap grows with the size of the change.
EasyQ2. An FDL model of exports on the real exchange rate has \( \hat\delta_0 = 0.10 \), \( \hat\delta_1 = 0.25 \), \( \hat\delta_2 = 0.15 \), \( \hat\delta_3 = 0.05 \). Find the impact multiplier, the LRP, and the effect one period after a permanent one-unit rise. Show worked answer
Impact multiplier: 0.10.
LRP \( = 0.10 + 0.25 + 0.15 + 0.05 = 0.55 \).
One period after a permanent rise the effects have accumulated to \( 0.10 + 0.25 = 0.35 \).
(After a temporary one-period rise, the effect one period later would be just \( \hat\delta_1 = 0.25 \).)
MediumQ3. A quarterly model is \( \hat y_t = 120 + 1.5t-8\,q2_t + 5\,q3_t + 14\,q4_t \). (a) Which quarter is the base? (b) Predict \( y \) at \( t = 41 \) (a first quarter) and \( t = 44 \) (a fourth quarter). (c) By how much should fourth-quarter values be reduced to deseasonalise them? Show worked answer
(a) Quarter 1: it has no dummy.
(b) \( t = 41 \): \( 120 + 1.5 \times 41 = 181.5 \). \( t = 44 \): \( 120 + 66 + 14 = 200.0 \).
(c) The average of the four seasonal effects is \( (0-8 + 5 + 14)/4 = 2.75 \). Q4 values are reduced by \( 14-2.75 = 11.25 \).
MediumQ4. An AR(1) model is \( \hat y_t = 1.2 + 0.6\,y_{t-1} \), and the last observed value is \( y_T = 5 \). Find the long-run mean and the forecasts for \( T+1 \) and \( T+2 \). Show worked answer
Long-run mean \( \mu = 1.2/(1-0.6) = 3.0 \).
\( \hat y_{T+1} = 1.2 + 0.6 \times 5 = 4.2 \).
\( \hat y_{T+2} = 1.2 + 0.6 \times 4.2 = 3.72 \).
Each step closes 40% of the remaining gap to the mean of 3.0.
MediumQ5. An analyst regresses a country’s annual tourist arrivals on its number of university graduates, 1995–2020, and finds a slope of 4.2 with \( t = 11 \) and \( R^2 = 0.95 \). With a linear time trend added, the slope is 0.3 with \( t = 0.6 \). Explain what has happened, using the Frisch–Waugh idea. Show worked answer
Both series trend upwards with income and population, so in levels they are strongly correlated whether or not graduates affect tourism.
By Frisch–Waugh, the slope with a trend is the slope from regressing detrended arrivals on detrended graduates. Once each series’ own trend is removed, the deviations barely move together (slope 0.3, insignificant).
The first regression was spurious: the time trend was an omitted variable correlated with both. The high \( R^2 \) reflected the shared trend, not an effect.
ExamQ6. In \( y_t = \alpha_0 + \delta_0 z_t + \delta_1 z_{t-1} + u_t \), \( \hat\delta_0 = 0.30 \) (s.e. 0.10), \( \hat\delta_1 = 0.20 \) (s.e. 0.10) and \( \widehat{\operatorname{Cov}}(\hat\delta_0, \hat\delta_1) = -0.004 \). (a) Find the LRP. [1] (b) Find its standard error. [3] (c) Test \( H_0 \): LRP = 0 at the 5% level. [1] (d) Explain why the standard error is not \( 0.10 + 0.10 \). [1] (e) Adding \( z_{t+1} \) gives it a coefficient with \( t = 3.9 \). What does this suggest, and what does it imply for OLS? [2] Show worked answer
(a) LRP \( = 0.30 + 0.20 = 0.50 \). [1]
(b) \( \operatorname{Var} = 0.10^2 + 0.10^2 + 2(-0.004) = 0.012 \) [M1 M1], so s.e. \( = \sqrt{0.012} = 0.110 \). [A1]
(c) \( t = 0.50/0.110 = 4.56 > 1.96 \): reject; the long-run effect is significant. [1]
(d) Standard errors do not add; variances add, plus twice the covariance. Here the negative covariance makes the LRP more precise than either coefficient alone. [1]
(e) Future \( z \) helps explain today’s \( y \), so there is feedback from \( y \) to \( z \) (or anticipation): strict exogeneity fails. [1] OLS is then not unbiased, though it may still be consistent if \( z \) is contemporaneously exogenous and the series are weakly dependent. [1]
Total: 8 marks.

Check yourself

1. The long-run propensity in a finite distributed lag model is

LRP \( = \delta_0 + \delta_1 + \dots + \delta_q \): the eventual effect of a permanent one-unit rise. For US consumption growth it is 0.744.

2. Adding a linear time trend to a regression of \( y \) on \( x \) is equivalent to

The Frisch–Waugh–Lovell theorem: the slope on \( x \) is the same as in the regression of the residuals from \( y \) on \( t \) on the residuals from \( x \) on \( t \).

3. A quarterly model with an intercept should include how many quarterly dummies?

One quarter is the base; including all four with an intercept is the dummy-variable trap.

Your score: 0 out of 3

The short version

  • Time series are ordered, dependent and observed at a fixed frequency. Plot them first.
  • \( 100\,\Delta\log y_t \approx \) % growth. US real GDP: 0.776% a quarter, about 3.1% a year.
  • FDL: impact multiplier \( \delta_0 \), LRP \( \sum\delta_j \), whose standard error needs the covariances. US consumption: impact 0.343, LRP 0.744 (s.e. 0.099).
  • TS.1–TS.3 give unbiasedness; strict exogeneity fails with feedback and always with a lagged dependent variable.
  • Trends and seasons create spurious relationships and inflate \( R^2 \). Including \( t \) and season dummies is the same as detrending and deseasonalising. The fake advertising effect fell from 9.671 to 0.094.
  • AR(1): long-run mean \( \beta_0/(1-\beta_1) \). GDP growth has \( \hat\beta_1 = 0.302 \); unemployment has 0.988, close to a unit root.
  • Chapter 17 of Econometrics Made Simple has the full chapter with code in Python, R and Stata. If you study several subjects, the Complete Book Bundle includes every Economics, Statistics, Mathematics and Econometrics book.
Econometrics Made Simple complete bundle coverTime series, unit roots and forecasting, plus every earlier chapter. Get the textbook and the practice book together for $19 (was $24).Both books · $19
Want more questions like these, with worked answers?
The practice book has over 1,150 more, graded from easy to exam level.
Next: step 18 of 20Stationarity and Unit Root Tests