19 Time Series

This chapter introduces time as a component in regression models. Times series represent a temporal ordering of the data. In the cross-section models seen so far, the observations could have been in any order. In this chapter, the ordering of the observations matters. It is usually assumed that there is a stochastic process generating the series and the important aspect is that only a single realization of the stochastic process is observed. The following topics are covered:

  • Trend and seasonality
  • Finite distributed lag models (including past or lagged independent variables)
  • Autoregressive model (including past or lagged dependent variables) also known as dynamic models:
  • Forecasting

The static regression model is presented before moving into proper time series analysis. The model is used if the data represents various time periods but the independent variables \(x_{i,t}\) have an immediate effect on the dependent variable \(y_t\). For example, if the per-capita chicken consumption is a function of the chicken price and real disposable income, then the following model can be estimated using the data in meatdemand.

summary(lm(qchicken~rdi+pchicken,data=meatdemand))
## 
## Call:
## lm(formula = qchicken ~ rdi + pchicken, data = meatdemand)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -6.6335 -2.4765  0.2693  2.2275  6.3905 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 47.8885914 17.7955903   2.691   0.0107 *  
## rdi          0.0014297  0.0002049   6.977 3.52e-08 ***
## pchicken    -0.1143327  0.0454294  -2.517   0.0164 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.204 on 36 degrees of freedom
## Multiple R-squared:  0.9545, Adjusted R-squared:  0.952 
## F-statistic: 377.8 on 2 and 36 DF,  p-value: < 2.2e-16

This assumes that there is an immediate effect of income and chicken price on consumption.