AI Agents & Econometric Coding

Time series · Time series

Granger Predictive Causality in a VAR

A Granger test asks whether lags of one series improve forecasts of another within a declared information set.

A prediction question

Let the equation for $y_t$ include two lags of both $y$ and $x$:

$$ y_t=a+b_1y_{t-1}+b_2y_{t-2}+c_1x_{t-1}+c_2x_{t-2}+u_t. $$

The test imposes the joint restriction

$$ H_0:c_1=c_2=0. $$

Rejection means that lagged $x$ adds predictive information after the included history of $y$ (Granger, 1969).

Restricted and unrestricted fits

Suppose the unrestricted residual sum of squares is 90. The restricted value is 100. There are two restrictions, 100 usable observations, and five unrestricted coefficients.

QuantityValue
RSS restricted100
RSS unrestricted90
Restrictions2
Residual degrees of freedom95

The comparison statistic is

$$ F=\frac{(100-90)/2}{90/95}=5.278. $$

Assumptions and implementation

The VAR should have a suitable lag order and stable dynamics. Innovations require an appropriate covariance model. Omitted relevant variables can change the predictive relation.

The result describes predictability. Structural causal interpretation needs additional restrictions. Software can report Wald, likelihood-ratio, or equation-level F forms with different finite-sample denominators.

The restricted information set sits inside the unrestricted set. Their forecast-error difference drives the test.

Interpretation and reporting

The statistic of $5.278$ measures how much the restricted equation loses fit after both lags of $x$ are removed. The restriction is joint. One lag can be weak while the pair still adds predictive information.

State the direction of the test. Evidence that $x$ predicts $y$ does not imply that $y$ predicts $x$. Report the variable set, lag order, usable time range, covariance estimator, and restriction list.

Granger causality is a prediction concept within the declared information set. An omitted series can create or remove the relation. Structural causal language requires further assumptions about shocks, timing, and intervention.

Reproducible implementation

Transform each series as required for stable VAR dynamics and align them on one time index. Select or declare the lag order before running the joint test. Keep the restricted and unrestricted equations on the same rows.

Estimate the unrestricted equation and test all coefficients on lagged $x$ together. Refit the restricted equation to verify the displayed RSS comparison when that form applies.

Check residual serial correlation and VAR stability. Repeat the reverse-direction test under its own restriction. Compare in-sample findings with out-of-sample forecast performance when prediction is the goal. Save lag definitions because software conventions can label the first usable observation differently (Lutkepohl, 2005).

Further reading

Granger defines the predictive concept (Granger, 1969). Lütkepohl develops testing in vector autoregressions (Lutkepohl, 2005).

Source status

Sources and further reading

  1. Clive W. J. Granger. 1969. “Investigating Causal Relations by Econometric Models and Cross-Spectral Methods.” Econometrica 37(3): 424--438. doi:10.2307/1912791.
  2. Helmut Lutkepohl. 2005. New Introduction to Multiple Time Series Analysis. Springer. doi:10.1007/978-3-540-27752-1.

Related reading

About this benchmark task

Status
In the benchmark
Identifier
var_granger
Family
Time series
Software
Stata, R, Python
Source
Benchmark task set

Task statement

Test whether y2 Granger-causes y1 with two lags using the aligned OLS F-test. Report rows F, df_num, df_den, and p_value.

Required output

F, df_num, df_den, p_value

Open every recorded run for this task.