8.7.2 Simple Linear Regression Applied to Time Series Data

8.7.2.1 Time Series Model with Time Period as the Dependent Variable

The techniques learned within general linear models can be applied to time series data. One of the simplest models within time series analysis for forecasting is simple linear regression

yi = β0 + β1xi + εi,  i = 1,2, ...,n,

where xi represents time period t and may be denoted by t. A more complex model could incorporate a nonlinear relationship as well. For example, a quadratic model,

yt = β0 + β1t + β2t2 + εt.

Time series models where the only independent variable is time, t, can be calculated in the same manner as a general linear model by simply substituting in the time period for the independent variable. A common practice is to set the first time period to zero. For example, looking at yearly data t would equal zero for the first year observed and t = 1 for the second time period, etc. Thus if the first time period observed is the year 2001, for the year 2001, t would be set to zero. This only effects the intercept in the general linear model, not the slope(s). In order to predict the dependent variable for the next time period, the value for the present time period plus one would be entered into the equation. For example, data collected from the year 1999 to the year 2007, setting the time period 1999 to zero, with the time series model ŷ = 10 + 5t, would yield an estimate of 10 + 5 * 9 = 55 for the year 2008. See Table ?? to understand why the year 2008 is replaced by the value 9.






Year Time period t Year Time period t
1999 0 2004 5
2000 1 2005 6
2001 2 2006 7
2002 3 2007 8
2003 4 2008 9





Table 8.1: Illustrating the conversion of year into a time period starting with zero.

8.7.2.2 Time Series Model with the Previous Time Period Data as the Independent Variable

Often the past can tell us about the future. An autoregressive time series model uses historical data of the dependent variable as the independent. The assumption of an autoregressive model is that the dependent variable is in essence a function of previous data of the dependent variable plus an error term, i.e. yt = f(yt-1,,y0) + εt.

A first order autoregressive model is a model which only uses the previous time period as the independent variable in the model and is written as:

yt = β0 + β1yt-1 + εt.

In Table ?? the previous year’s EPS is used as the independent variable for understanding EPS. In the example from Table ??, the estimate for the intercept is 0.1 and the estimate for the slope is 1.0. The estimates are obtained the same way as in simple linear regression, using the least squares method. The regression equation is

ˆyt = 0.1 + 1.0 × yt- 1,

and thus the prediction for the EPS for the year 2009 equals 0.1 + 1.0 × 1.9 = 2.0, where the value of 1.9 is from the year 2008, the year prior to 2009.








Year EPS Previous Year’s EPS Year EPS Previous Year’s EPS
1999 1.0 2004 1.5 1.4
2000 1.1 1.0 2005 1.6 1.5
2001 1.2 1.1 2006 1.7 1.6
2002 1.3 1.2 2007 1.8 1.7
2003 1.4 1.3 2008 1.9 1.8







Table 8.2: Illustrating the dependent variable in a first order autoregressive model.

A pth order autoregressive model uses p previous time periods and written

yt = β0 + β1yt-1 + β2yt- 2 + ⋅⋅⋅ + βpyt-p + εt.

In this section only the very basic time series models were covered for introductory purposes. There exist non-linear time series models and other more complicated time series models than those presented here which go beyond the scope of this text.