# Category: Time Series Analysis and Forecasting

## First Order Autocorrelation

Consider the multiple regression model

$$Y_t=\beta_1+\beta_2 X_{2t}+\beta_3 X_{3t}+\cdots+\beta_k X_{kt}+u_t,$$

in which the current observation of the error term ($u_t$) is a function of the previous (lagged) observation of the error term ($u_{t-1}$). That is,

\begin{align*}
u_t = \rho u_{t-1} + \varepsilon_t, \tag*{eq 1}
\end{align*}

where $\rho$ is the parameter depicting the functional relationship among observations of the error term $u_t$ and $\varepsilon_t$ is a stochastic error term which is iid (identically independently distributed). It satisfy the standard OLS assumption:

\begin{align*}
E(\varepsilon) &=0\\
Var(\varepsilon) &=\sigma_t^2\\
Cov(\varepsilon_t, \varepsilon_{t+s} ) &=0
\end{align*}

Note if $\rho=1$, then all these assumptions are undefined.

The scheme (eq1) is known as a Markov first-order autoregressive scheme, usually denoted by AR(1). The eq1 is interpreted as the regression of $u_t$ on itself tagged on period. It is first-order because $u_t$ and its immediate past value are involved. Note the $Var(u_t)$ is still homoscedasticity under AR(1) scheme.

The coefficient $\rho$ is called the first-order autocorrelation coefficient (also called the coefficient of autocovariance) and takes values from -1 to 1 or ($|\rho|<1$). The size of $\rho$ determines the strength of autocorrelation (serial correlation).  There are three different cases:

1. If $\rho$ is zero, then there is no autocorrelation because $u_t=\varepsilon_t$.
2. If $\rho$ approaches to 1, the value of the previous observation of the error ($u_t-1$) becomes more important in determining the value of the current error term ($u_t$) and therefore, greater positive autocorrelation exists. The negative error term will lead to negative and positive will lead to a positive error term.
3. If $\rho$ approaches to -1, there is a very high degree of negative autocorrelation. The signs of the error term have a tendency to switch signs from negative to positive and vice versa in consecutive observations.

For first order autocorrelation AR(1)

\begin{align*}
u_t &= \rho u_{t-1}+\varepsilon_t\\
E(u_t) &= \rho E(u_{t-1})+ E(\varepsilon_t)=0\\
Var(u_t)&=\rho^2 Var(u_{t-1}+var(\varepsilon_t)\\
\text{Because $u$’s and $\varepsilon$’s are uncorrelated}\\
Var(u_t)&=\sigma^2\\
Var(u_{t-1}) &=\sigma^2\\
Var(\varepsilon_t)&=\sigma_t^2\\
\Rightarrow Var(u_t) &=\rho^2 \sigma^2+\sigma_t^2\\
\Rightarrow \sigma^2-\rho^2\sigma^2 &=\sigma_t^2\\
\Rightarrow \sigma^2(1-\rho^2)&=\sigma_t^2\\
\Rightarrow Var(u_t)&=\sigma^2=\frac{\sigma_t^2}{1-\rho^2}
\end{align*}

For covariance, multiply equation (eq1) by $u_{t-1}$ and taking the expectations on both sides

\begin{align*}
u_t\cdot u_{t-1} &= \rho u_{t-1} \cdot u_{t-1} + \varepsilon_t \cdot u_{t-1}\\
E(u_t u_{t-1}) &= E[\rho u_{t-1}^2 + u_{t-1}\varepsilon_t ]\\
cov(u_t, u_{t-1}) &= E(u_t u_{t-1}) = E[\rho u_{t-1}^2 + u_{t-1}\varepsilon_t ]\\
&=\rho \frac{\sigma_t^2}{1-\rho^2}\tag*{$\because Var(u_t) = \frac{\sigma_t^2}{1-\rho^2}$}
\end{align*}

Similarly,
\begin{align*}
cov(u_t,u_{t-2}) &=\rho^2 \frac{\sigma_t^2}{(1-\rho^2)}\\
cov(u_t,u_{t-2}) &= \rho^2 \frac{\sigma_t^2}{(1-\rho^2)}\\
cov(u_t, u_{t+s}) &= \rho^p
\end{align*}

## Consequences of Autocorrelation

In this post, we will discuss some important consequences of the existence of autocorrelation in the data. The consequences of the OLS estimators in the presence of Autocorrelation can be summarized as follows:

• When the disturbance terms are serially correlated then the OLS estimators of the $\hat{\beta}$s are still unbiased and consistent but the optimist property (minimum variance property) is not satisfied.
• The OLS estimators will be inefficient and therefore, no longer BLUE.
• The estimated variance of the regression coefficients will be biased and inconsistent and will be greater than the variances of estimate calculated by other methods, therefore, hypothesis testing is no longer valid. In most of the cases, $R^2$ will be overestimated (indicating a better fit than the one that truly exists). The t- and F-statistics will tend to be higher.
• The variance of random term $u$ may be under-estimated if the $u$’s are autocorrelated. That is, the random variance $\hat{\sigma}^2=\frac{\sum \hat{u}_i^2}{n-2}$ is likely to be under-estimate the true $\sigma^2$.
• Among the consequences of autocorrelation another is, if the disturbance terms are autocorrelated then the OLS estimates are not asymptotic. That is $\hat{\beta}$s are not asymptotically efficient.

## Reasons for Autocorrelation

There are several reasons for Autocorrelation, some reasons for autocorrelation are:

i) Inertia

Inertia or sluggishness in economic time-series is a great reason for autocorrelation. For example, GNP, production, price index, employment, and unemployment exhibit business cycles. Starting at the bottom of the recession, when the economic recovery starts, most of these series start moving upward. In this upswing, the value of a series at one point in time is greater than its previous values. These successive periods (observations) are likely to be interdependent.

ii) Omitted Variables Specification Bias

The residuals (which are proxies for $u_i$) may suggest that some variables that were originally candidate but were not included in the model (for a variety of reasons) should be included. This is the case of excluded variable specification bias. Often the inclusion of such variables may remove the correlation pattern observed among the residuals. For example, the model

$$Y_t = \beta_1 + \beta_2 X_{2t} + \beta_3 X_{3t} + \beta_4 X_{4t} + u_t,$$

is correct. However, running

$$Y_t=\beta_1 + \beta_2 X_{2t} + \beta_3X_{3t}+v_i,\quad \text{where v_t=\beta_4X_{4t}+u_t },$$

the error or disturbance term will reflect a systematic pattern. Thus creating false autocorrelation, due to exclusion of $X_{4t}$ variable from the model. The effect of $X_{4t}$ will be captured by the disturbances $v_t$.

iii) Model Specification: Incorrect Functional Form

Autocorrelation can also occur due to the miss-specification of the model. Suppose that $Y_t$ is connected to $X_{2t}$ with a quadratic relation

$$Y_t=\beta_1 + \beta_2 X_{2t}^2+u_t,$$

but we wrongly estimate a straight line relationship ($Y_t=\beta_1 + \beta_2X_{2t}+u_t$). In this case, the error term obtained from the straight line specification will depend on $X_{2t}^2$. If $X_{2t}$ is increasing/decreasing over time, $u_t$ will also be increasing or decreasing over time.

iv) Effect of Cobweb Phenomenon

The quantity supplied in the period $t$ of many agricultural commodities depends on their price in period $t-1$. This is called the Cobweb phenomenon. This is because the decision to plant a crop in a period of $t$ is influenced by the price of the commodity in that period. However, the actual supply of the commodity is available in the period $t+1$.

\begin{align*}
QS_{t+1} &= \alpha + \beta P_t + \varepsilon_{t+1}\\
\text{or }\quad QS_t &= \alpha + \beta P_{t-1} + \varepsilon_t
\end{align*}

This supply model indicates that if the price in period $t$ is higher, the farmer will decide to produce more in the period $t+1$. Because of increased supply in period $t+1$, $P_{t+1}$ will be lower than $P_t$. As a result of lower price in period $t+1$, the farmer will produce less in period $t+2$ than they did in period $t+1$. Thus disturbance in the case of the Cobweb phenomenon ar not expected to be random, rather, they will exhibit a systematic pattern and thus cause a problem of autocorrelation.

v) Effect of Lagged Relationship

Many times in business and economic research the lagged values of the dependent variable are used as explanatory variables. For example, to study the effect of tastes and habits on consumption in a period $t$, consumption in period $t-1$ is used as an explanatory variable since consumer do not change their consumption habits readily for psychological, technological, or institutional reasons. The consumption function will be

$$C_t = \alpha + \beta Y + \gamma C_{t-1} + \varepsilon_t,$$
where $C$ is consumption and $Y$ is income.

If the lagged terms ($C_{t-1}$) is not included in the above consumption function, the resulting error term will reflect a systematic pattern due to the impact of habits and tastes on current consumption and thereby autocorrelation will be present.

vi) Data Manipulation

Often raw data are manipulated in the empirical analysis. For example, in time-series regression involving quarterly data, such data are usually derived from the monthly data by simply adding three monthly observations and dividing the sum by 3. This averaging introduces smoothness into the data by dampening the fluctuations on the monthly data. This smoothness may itself lend to a systematic pattern in the disturbances, thereby introducing autocorrelation.

Interpolation or extrapolation of data is also another source of data manipulation.

Vii) Non-Stationarity

It is quite possible that both $Y$ and $X$ are non-stationary and therefore, the error $u$ is also non-stationary. In this case, the error term will exhibit autocorrelation.

This is all about reasons for autocorrelation.

## Autocorrelation: an Introduction

The term autocorrelation may be defined as a “correlation between members of a series of observations ordered in time (as in time series data) or space (as in cross-sectional data). Autocorrelation is most likely to occur in time-series data. In the regression context, the CLRM assumes that covariances and correlations do not exist in the disturbances $u_i$. Symbolically,

$$Cov(u_i, u_j | x_i, x_j)=E(u_i u_j)=0, \quad i\ne j$$

In simple words, the disturbance term relating to any observation is not influenced by the disturbance term relating to any other observation. In other words, the error terms $u_i$ and $u_j$ are independently distributed (serially independent). If there are dependencies among disturbance terms, then there is a problem of autocorrelation. Symbolically,

$$Cov(u_i,u_j|x_i, x_j) = E(u_i, u_j) \ne 0,\quad i\ne j$$

Suppose, we have disturbance terms from two different time series say $u$ and $v$ such as $u_1, u_2, \cdots, u_{10}$, and $v_1,v_2,\cdots, v_{11}$, then the correlation between these two different time series is called serial correlation (that is, the lag correlation between two series).

Suppose, we have two-time series $u$ ($u_1,u_2,\cdots, u_{10}$) and the lag values of this series are $u_2, u_3,\cdots, u_{12}$, then the correlation between these series is called autocorrelation (that is the lag correlation of a given series with itself, lagged by a number of time units).

The use of OLS to estimate a regression model results in BLUE estimates of the parameters only when all the assumptions of the CLRM are satisfied. After performing regression analysis one may plot the residuals to observe some patterns when results are not according to prior expectations.

Some plausible patterns of autocorrelation and non-autocorrelation are:

Figure $a$–$d$ show that there is a discernible (\texturdu{قابل دریافت، عیاں، قابل فہم}) pattern among the $u$’s.
ٖFigure (a) shows a cyclical pattern.
Figure (b) suggests an upward linear trend in the disturbances
Figure (c) suggests a downward linear trend in the disturbances
Figure (d) indicates both the linear and quadratic trend terms are present in the disturbances
Figure (e) shows no systematic pattern. Therefore, supporting the assumption of CLRM of no autocorrelation.