Tutorials › Econometrics (Graduate) › OLS Estimation of VAR Systems

VAR, Volatility, and Forecasts · Tutorial 411 of 952

OLS Estimation of VAR Systems

Learn how to estimate VAR coefficients by OLS, quantify correlated innovations, and test several coefficient restrictions jointly.

Advanced 12 min read

What You'll Learn

  • Derive the matrix OLS estimator for a reduced-form VAR with common regressors
  • Explain when equation-by-equation OLS matches system GLS and conditional Gaussian maximum likelihood
  • Compute maximum-likelihood and degrees-of-freedom-adjusted innovation covariance estimates
  • Construct a Wald test for linear restrictions on multiple VAR coefficients
  • Recognize the assumptions and limitations of standard VAR coefficient inference

Why OLS Works Naturally for a Reduced-Form VAR

A reduced-form vector autoregression models each variable using the same set of lagged variables. This shared regressor structure is important: it means the equations can be estimated separately by ordinary least squares (OLS), even when their innovations are contemporaneously correlated. The resulting coefficient estimates also agree with system generalized least squares (GLS), under the conditions described below.

That equivalence does not make the system’s covariance irrelevant. It determines the uncertainty of the estimated coefficients, records contemporaneous dependence among innovations, and enters joint tests that involve coefficients from more than one equation.

Model: For an \(m\)-variable reduced-form VAR of order \(p\), write \(y_t=A_1y_{t-1}+\cdots+A_py_{t-p}+u_t\), where \(y_t\) and \(u_t\) are \(m\times1\) vectors, each \(A_j\) is an \(m\times m\) coefficient matrix, and \(u_t\) is the innovation vector. For the \(T\) usable observations, let \(Y\) be the \(T\times m\) matrix of responses, \(X\) the \(T\times k\) matrix of common regressors, and \(B\) the \(k\times m\) coefficient matrix. In the VAR without additional regressors, \(k=mp\). Then \(Y=XB+U\), where \(U\) is the \(T\times m\) innovation matrix.

The standard assumptions for the estimation and inference described here are that innovations have conditional mean zero given past information, have a finite positive-definite covariance matrix \(\Sigma\), and are serially uncorrelated. Thus \(E(u_t\mid\mathcal F_{t-1})=0\) and \(E(u_tu_t'\mid\mathcal F_{t-1})=\Sigma\). The regressors must have full column rank for OLS to be uniquely defined. Large-sample inference additionally requires regularity conditions such as a nonsingular limiting regressor second moment and suitable stationarity, ergodicity, and moment conditions. Contemporaneous correlation between components of \(u_t\) is allowed.

Equation-by-Equation OLS

Let \(y_i\) denote column \(i\) of \(Y\), and let \(b_i\) be column \(i\) of \(B\). Equation \(i\) is the regression \(y_i=Xb_i+u_i\). Its OLS estimator minimizes the sum of squared residuals in that equation. Stacking the equations gives the equivalent matrix criterion: choose \(B\) to minimize the sum of squared entries of \(Y-XB\).

$$ \widehat B=(X'X)^{-1}X'Y,\qquad \widehat U=Y-X\widehat B. $$

This follows by differentiating \(\operatorname{tr}\{(Y-XB)'(Y-XB)\}\) with respect to \(B\). The first-order condition is \(X'(Y-XB)=0\), or \(X'XB=X'Y\). Full column rank makes \(X'X\) invertible, giving the estimator above. Each column of \(\widehat B\) is exactly the OLS estimate from its corresponding equation. The residuals satisfy the normal equations \(X'\widehat U=0\).

Equation-by-equation estimation is straightforward, but it should not be confused with assuming independent equations. The estimates from different equations can be correlated because their innovations are correlated. That dependence is captured by \(\Sigma\) and matters when quantifying uncertainty or testing restrictions jointly.

When OLS Matches System Estimation

In system GLS, the covariance across equations is used to weight residuals. If every equation has the same regressor matrix \(X\), that weighting does not change the coefficient estimates. To see why, suppose \(\Sigma\) is positive definite and consider the GLS objective \(\operatorname{tr}\{\Sigma^{-1}(Y-XB)'(Y-XB)\}\). Its first-order condition is \(X'(Y-XB)\Sigma^{-1}=0\). Since \(\Sigma^{-1}\) is invertible, this is equivalent to \(X'(Y-XB)=0\), the OLS normal equation. Hence system GLS and equation-by-equation OLS give the same \(\widehat B\).

The same result holds when GLS uses a consistent estimate of \(\Sigma\): with common regressors, the weighting still cancels from the coefficient normal equations. Under conditionally Gaussian innovations, the conditional Gaussian likelihood also has its coefficient maximum at \(\widehat B\). One way to verify this is the residual cross-product identity below.

$$ (Y-XB)'(Y-XB) = \widehat U'\widehat U +(B-\widehat B)'X'X(B-\widehat B). $$

The cross terms vanish because \(X'\widehat U=0\). The second term on the right is positive semidefinite. Therefore, for every candidate \(B\), the residual cross-product matrix is at least as large as \(\widehat U'\widehat U\) in the positive-semidefinite ordering. When the residual covariance is positive definite, this also means its determinant cannot be smaller. The Gaussian likelihood, maximized over the innovation covariance, is consequently maximized at \(\widehat B\).

The shared-regressor condition is the key. In a general system where different equations use different regressors, cross-equation covariance can affect the GLS coefficient estimates. In an unrestricted reduced-form VAR, each equation uses the same lagged-variable vector, which is why equation-by-equation OLS has this special system-estimation equivalence.

Estimating the Innovation Covariance

After estimating the coefficients, collect the fitted innovations in \(\widehat U=Y-X\widehat B\). The residual cross-product \(\widehat U'\widehat U\) summarizes both residual variation within each equation and residual covariation across equations. With \(T\) usable observations, the conditional Gaussian maximum-likelihood covariance estimator divides this matrix by \(T\).

$$ \widehat\Sigma_{\mathrm{ML}}=\frac{\widehat U'\widehat U}{T}. $$

A commonly reported degrees-of-freedom-adjusted version divides by \(T-k\), since \(k\) coefficients were estimated in each equation:

$$ \widehat\Sigma_{\mathrm{adj}}=\frac{\widehat U'\widehat U}{T-k}. $$

Both estimates are \(m\times m\) matrices. The diagonal entry \(\widehat\Sigma_{ii}\) estimates the innovation variance in equation \(i\); an off-diagonal entry estimates the covariance between two equations’ innovations. The adjustment is a conventional finite-sample correction. It should not be treated as an exact unbiasedness guarantee for every dynamic regression, since lagged regressors are random rather than fixed.

Worked Example: Computing OLS Residuals and Innovation Covariance

Consider a hypothetical two-equation VAR estimation problem with five usable rows and two common regressors per equation. Suppose the regressor matrix, response matrix, and fitted response matrix are as follows. The first regressor can represent a common constant and the second a lagged-variable regressor.

$$ X= \begin{pmatrix} 1&5\\1&0\\1&0\\1&1\\1&-3 \end{pmatrix},\qquad Y= \begin{pmatrix} 11.4&-2\\ 1.2&0\\ 0&4\\ 2.8&-1\\ -4.4&6 \end{pmatrix},\qquad X\widehat B= \begin{pmatrix} 11&-3\\ 1&2\\ 1&2\\ 3&1\\ -5&5 \end{pmatrix}. $$

Subtract fitted values from observed responses row by row. The resulting residual matrix is

$$ \widehat U= \begin{pmatrix} 0.4&1\\ 0.2&-2\\ -1&2\\ -0.2&-2\\ 0.6&1 \end{pmatrix}. $$

For example, the first residual in equation two is \(-2-(-3)=1\). The residual cross-products are computed by summing products down the columns:

$$ \widehat U'\widehat U = \begin{pmatrix} 0.4^2+0.2^2+(-1)^2+(-0.2)^2+0.6^2 & 0.4(1)+0.2(-2)+(-1)(2)+(-0.2)(-2)+0.6(1) \\ -1.0 & 1^2+(-2)^2+2^2+(-2)^2+1^2 \end{pmatrix} = \begin{pmatrix} 1.6&-1.0\\ -1.0&14 \end{pmatrix}. $$

Here \(T=5\) and \(k=2\). Thus the maximum-likelihood estimate is \(\widehat\Sigma_{\mathrm{ML}}=\frac{1}{5}\begin{pmatrix}1.6&-1.0\\-1.0&14\end{pmatrix}=\begin{pmatrix}0.3200&-0.2000\\-0.2000&2.800\end{pmatrix}\). The degrees-of-freedom-adjusted estimate is

$$ \widehat\Sigma_{\mathrm{adj}} = \frac{1}{3} \begin{pmatrix} 1.6&-1.0\\ -1.0&14 \end{pmatrix} = \begin{pmatrix} 0.5333&-0.3333\\ -0.3333&4.667 \end{pmatrix}. $$

The negative off-diagonal estimate indicates that, in these fitted residuals, positive deviations in one equation tend to accompany negative deviations in the other. It is a covariance, not a correlation; dividing it by the square root of the product of the estimated variances would give the corresponding estimated correlation.

Joint Tests of VAR Coefficients

A joint test asks whether several coefficients satisfy restrictions simultaneously. Write \(b=\operatorname{vec}(B)\), stacking the columns of \(B\) in order. A set of \(q\) linear restrictions can be written \(H_0:Rb=r\), where \(R\) is a specified \(q\times km\) matrix and \(r\) is a specified \(q\times1\) vector. The alternative is that at least one restriction fails.

Under the regularity conditions for large-sample VAR inference, a plug-in estimate of the covariance matrix of \(b\) is \(\widehat V=\widehat\Sigma\otimes(X'X)^{-1}\), using a chosen residual covariance estimate. This expression reflects both ingredients: \((X'X)^{-1}\) describes regressor information, and \(\widehat\Sigma\) includes covariance between equations. The Wald statistic is

$$ W=(R\widehat b-r)' \left[R\widehat V R'\right]^{-1} (R\widehat b-r). $$

If the restrictions are linearly independent and the null is true, \(W\) has an asymptotic chi-square distribution with \(q\) degrees of freedom. The p-value is the upper-tail probability \(P(\chi_q^2\ge W)\). This is a large-sample result; replacing \(W\) by \(W/q\) and comparing with an \(F\) reference distribution is sometimes used as a finite-sample approximation, but should not automatically be described as exact for a VAR with random lagged regressors.

Worked Example: Testing Two Coefficients Jointly

Use the hypothetical estimates above to test whether both coefficients in equation two are zero. The coefficient matrix is \(\widehat B=\begin{pmatrix}1&2\\2&-1\end{pmatrix}\), so the equation-two coefficient vector is \(\widehat b_2=(2,-1)'\). The null is \(H_0:b_2=(0,0)'\). The regressor cross-product is \(X'X=\begin{pmatrix}5&3\\3&35\end{pmatrix}\). For this test, the equation-two block of the estimated coefficient covariance is \(\widehat\Sigma_{22}(X'X)^{-1}\). Using \(\widehat\Sigma_{\mathrm{adj},22}=14/3\), the Wald statistic simplifies to

$$ W = \widehat b_2' \left[\frac{14}{3}(X'X)^{-1}\right]^{-1} \widehat b_2 = \frac{3}{14}\widehat b_2'X'X\widehat b_2. $$

The arithmetic is \(\widehat b_2'X'X\widehat b_2=(2,-1)\begin{pmatrix}5&3\\3&35\end{pmatrix}\begin{pmatrix}2\\-1\end{pmatrix}=43\). Therefore \(W=(3/14)(43)=9.214\). With \(q=2\), the asymptotic reference distribution is \(\chi^2_2\), giving \(p\approx0.0100\). At the 5% level, this is evidence against the joint null that both equation-two coefficients are zero. Because this illustration has only five observations, the asymptotic p-value is pedagogical rather than a reliable small-sample inference.

Assumptions, Interpretation, and a Common Pitfall

OLS coefficient estimates describe conditional linear relationships between the modeled variables and their lags. They are not, by themselves, causal effects. For standard large-sample coefficient tests, the innovation mean-zero condition prevents systematic prediction of current innovations from past information; the covariance and serial-dependence assumptions support the stated covariance formula; and the regressor rank condition makes the estimates identifiable. If innovations are serially correlated or their conditional covariance is not constant, the usual covariance and Wald calculations may not be valid without an appropriate alternative method.

A frequent mistake is to infer that correlated innovations require system GLS to obtain different, more efficient VAR coefficients. That reasoning overlooks the common regressor matrix: GLS weights residuals across equations, but its coefficient normal equations reduce to the same equations as OLS. Correlated innovations still matter for the estimated covariance matrix and for cross-equation joint tests. Another pitfall is to call \(\widehat U'\widehat U/T\) the degrees-of-freedom-adjusted estimate; the divisor is \(T\) for the conditional Gaussian maximum-likelihood estimate and \(T-k\) for the conventional adjustment.

Key takeaway: In a reduced-form VAR with the same regressors in every equation, estimate each equation by OLS to obtain \(\widehat B=(X'X)^{-1}X'Y\). Use the residual cross-product matrix to estimate contemporaneous innovation covariance, and include that covariance when constructing joint coefficient tests.

Check Your Understanding

Answer each question using the definitions and results above.

  1. Why do equation-by-equation OLS and system GLS give the same coefficient estimates when every equation has the same regressor matrix?
  2. For \(T\) usable observations and \(k\) regressors per equation, what distinguishes the divisor in the maximum-likelihood covariance estimate from the degrees-of-freedom-adjusted divisor?
  3. What does a negative off-diagonal element of the estimated innovation covariance matrix describe?
  4. State the null and asymptotic reference distribution for a Wald test of \(q\) independent linear coefficient restrictions.
  5. Why should a chi-square Wald p-value based on a very short VAR sample be interpreted cautiously?
Clinical Biostats