Why Transform a Regression With Serially Correlated Errors?
In a time-ordered regression, errors may be correlated across observations even after the conditional mean has been modeled. When that dependence follows a stationary first-order autoregressive structure, the covariance matrix has a particularly useful form: a simple difference between adjacent observations removes the serial correlation after the first observation. The first observation needs a separate adjustment because it has no preceding observation to difference against.
This transformation is not a change to the substantive regression model. It rewrites the same GLS criterion as ordinary least squares on transformed outcomes and regressors. The distinction matters: the transformation depends on the assumed error covariance, and the covariance assumptions must hold for the design being analyzed.
Model and Covariance Assumptions
For this tutorial, treat the regressors as fixed and assume the error covariance is the stationary AR(1) covariance just stated. Equivalently, with random regressors, impose the corresponding conditional moment assumptions explicitly: \(E(u\mid X)=0\) and \(\operatorname{Var}(u\mid X)=\sigma_\varepsilon^2R/(1-\rho^2)\), where \(R_{st}=\rho^{|t-s|}\). An unconditional covariance statement alone does not establish this conditional covariance. This qualification ensures that the GLS calculation is justified for the design at hand.
Write \(\Omega=\operatorname{Var}(u)=\sigma_\varepsilon^2R/(1-\rho^2)\) for a fixed design. GLS minimizes the error quadratic form \((y-X\beta)'\Omega^{-1}(y-X\beta)\). The goal is to find a matrix transformation \(T\) for which \(T\Omega T'=\sigma_\varepsilon^2 I\), so the transformed errors have equal variance and zero covariance across observations.
Deriving the AR(1) Transformation
For each observation after the first, subtract \(\rho\) times the preceding observation. The regression equation becomes \(y_t-\rho y_{t-1}=(x_t-\rho x_{t-1})'\beta+(u_t-\rho u_{t-1})\). Because the AR(1) equation gives \(u_t-\rho u_{t-1}=\varepsilon_t\), these later transformed errors are the innovations. But the first observation is not an innovation: \(u_1\) has stationary variance \(\sigma_\varepsilon^2/(1-\rho^2)\). Multiplying the first equation by \(\sqrt{1-\rho^2}\) gives it the same error variance as the innovations.
In equations, if \(y^*=Ty\) and \(X^*=TX\), the rows are
and each regressor column is transformed by exactly the same rule. In particular, an intercept column becomes \(\sqrt{1-\rho^2}\) in the first row and \(1-\rho\) in each later row. It does not remain a column of ones.
Multiply the first outcome and every first-row regressor by \(\sqrt{1-\rho^2}\).
For each \(t\geq2\), subtract \(\rho\) times the previous outcome and regressor row.
Regress \(y^*\) on \(X^*\); with the stated covariance assumptions, the resulting coefficient estimate is GLS.
Why the Transformation Gives GLS
The key justification is that the transformation whitens the specified covariance, rather than merely making adjacent observations look less correlated. To see the covariance calculation directly, \(v_1=\sqrt{1-\rho^2}u_1\) has variance \(\sigma_\varepsilon^2\). For \(t\geq2\), \(v_t=u_t-\rho u_{t-1}=\varepsilon_t\), whose variance is also \(\sigma_\varepsilon^2\). Under the stationary AR(1) model, the initial error is uncorrelated with subsequent innovations, and the innovations are uncorrelated with one another. Hence the transformed errors have covariance \(\sigma_\varepsilon^2 I\).
The GLS equivalence follows by substituting \(\Omega^{-1}=\sigma_\varepsilon^{-2}T'T\) into its criterion. The positive scalar \(\sigma_\varepsilon^{-2}\) does not change the minimizer, leaving the transformed sum of squared residuals.
Therefore, minimizing the GLS criterion over \(\beta\) is equivalent to minimizing \(\|y^*-X^*\beta\|^2\). This proves the coefficient-estimate equivalence. It does not claim that a covariance model is correct merely because a transformation has been applied; the assumed covariance structure remains essential.
Worked Example: Transforming Outcomes and Regressors
Suppose three hypothetical observations have \(y=(10,12,13)'\), and a single regressor has values \(x=(1,2,4)'\). Let the assumed AR(1) parameter be \(\rho=0.5\). Apply the transformation, including its first-row adjustment.
Here \(\sqrt{1-\rho^2}=\sqrt{0.75}\approx0.8660\). For the outcome, the first transformed value is \(0.8660(10)=8.660\). The next two are \(12-0.5(10)=7\) and \(13-0.5(12)=7\). Thus \(y^*=(8.660,7,7)'\), to four significant figures.
Apply the identical operation to the regressor: \(x_1^*=0.8660(1)=0.8660\), \(x_2^*=2-0.5(1)=1.5\), and \(x_3^*=4-0.5(2)=3\). Therefore \(x^*=(0.8660,1.5,3)'\). If the model includes an intercept, its transformed column is \((0.8660,0.5,0.5)'\), not \((1,1,1)'\).
This calculation assumes that \(\rho=0.5\) is the covariance parameter being used and that the stationary covariance assumptions hold for these observations. It illustrates the transformation only; coefficient estimation would require transforming every regressor column and then fitting the transformed regression.
Worked Example: Verifying the First-Observation Adjustment
For \(n=3\) and \(\rho=0.5\), verify that the transformation gives an identity covariance matrix up to the factor \(\sigma_\varepsilon^2\). The stationary error covariance is
The first transformed variance is \(0.75(4/3)\sigma_\varepsilon^2=\sigma_\varepsilon^2\). For the second row, the variance is \([0.25(4/3)+4/3-2(0.5)(2/3)]\sigma_\varepsilon^2=\sigma_\varepsilon^2\). The third row has the same variance by the same calculation.
For example, the covariance between the first and second transformed errors is \(\sqrt{0.75}[-0.5(4/3)+2/3]\sigma_\varepsilon^2=0\). For the second and third transformed errors, it is \([2/3-(0.5)(4/3)-(0.5)(1/3)+0.25(2/3)]\sigma_\varepsilon^2=0\). The first and third transformed errors also have zero covariance: \(\sqrt{0.75}[-0.5(2/3)+1/3]\sigma_\varepsilon^2=0\). Thus \(T\Omega T'=\sigma_\varepsilon^2 I\), including the first row. Without its special scaling, the first transformed error would not have the innovation variance.
Calculating GLS Estimates
The following example computes the coefficients rather than stopping at the transformation. The data are hypothetical and ordered in time. Assume the regression has an intercept and a linear time regressor, and use a known AR(1) covariance parameter \(\rho=0.5\). As above, the regressors are treated as fixed and the error covariance is assumed to be the stationary AR(1) covariance. These conditions make the transformed least-squares estimate the GLS estimate.
Worked Example: GLS for a Short Time-Ordered Dataset
Let \(t=1,2,3,4\), use \(x_t=t-1\), and observe \(y=(2,3,4,5)'\). Fit \(y_t=\beta_0+\beta_1x_t+u_t\) with \(\rho=0.5\). Transform the first row using \(\sqrt{0.75}\approx0.8660\). The transformed outcome is \((1.732,2,2.5,3)'\), and the transformed intercept and time-regressor columns are \((0.8660,0.5,0.5,0.5)'\) and \((0,1,1,1)'\), respectively.
Write \(b_0,b_1\) for candidate coefficients. The transformed residual sum of squares is
The three later transformed outcomes have mean \(2.5\), and their squared deviations from that mean sum to \((2-2.5)^2+(2.5-2.5)^2+(3-2.5)^2=0.5\). Consequently, for any \(b_0,b_1\), the last three terms can be written as \(0.5+3(2.5-0.5b_0-b_1)^2\). Thus
The first term is minimized at \(b_0=2\), while the final squared term can be zero by setting \(b_1=2.5-0.5b_0\). At \(b_0=2\), this gives \(b_1=1.5\). The resulting GLS estimates are \(\hat{\beta}_0=2\) and \(\hat{\beta}_1=1.5\). The intercept is in outcome units, and the slope is in outcome units per one-unit increase in \(x_t\). This is the estimate for the specified \(\rho\) and covariance model; it is not the ordinary least-squares estimate from the untransformed observations.
Interpretation, Use, and a Common Pitfall
The transformation is useful because it converts a particular GLS problem into a familiar least-squares calculation while preserving the GLS coefficient estimate. Its simplicity depends on the AR(1) structure and on using the correct \(\rho\). A different covariance pattern generally calls for a different whitening transformation. Also, the transformed regression is a computational representation of the GLS objective, not evidence by itself that the original errors follow a stationary AR(1) process.
A common mistake is to difference every row using \(y_t-\rho y_{t-1}\), including the first observation, or to leave the first observation unadjusted while treating all transformed errors as having variance \(\sigma_\varepsilon^2\). The first observation has no predecessor, and under stationarity its original error variance is \(\sigma_\varepsilon^2/(1-\rho^2)\), not \(\sigma_\varepsilon^2\). Multiplication by \(\sqrt{1-\rho^2}\) is what brings its transformed variance to the innovation variance.
A second important pitfall is to infer a conditional covariance model from an unconditional one when regressors are random. GLS conditional on \(X\) requires the conditional covariance to have the stipulated form (and the conditional mean to be correctly specified). State whether the design is fixed or give the conditional moment assumptions; do not substitute an unconditional covariance statement for them.
Check Your Understanding
Use the model, covariance assumptions, and transformation developed above.
- For \(\rho=0.6\), what multiplier is applied to the first observation, and what is the transformation for observation \(t=3\)?
- In a regression with an intercept, what are the first two entries of the transformed intercept column?
- Why does the first transformed error require a different operation from later transformed errors?
- What assumptions permit the transformed least-squares coefficient estimate to be interpreted as GLS conditional on random regressors?
- If \(\operatorname{Var}(u\mid X)\) is not the stated AR(1) covariance, what part of the GLS justification cannot be concluded from this transformation alone?