Granger test: do earlier values of one series help with the other?
In brief
Do earlier values of one series help to predict the other? The Granger test checks this beyond the other series' own past, in both directions and only on a click. It shows leading, not a cause.
How it works in Statable
- In the card "How does a value develop over time?" choose the second series under "More options".
- In the section "Do earlier values of one series help with the other? (Granger test)" choose the number of lags k (a whole number).
- "Calculate Granger test".
How it is calculated
For each direction two models are compared, both for the cases t = k + 1 to n: the unrestricted model predicts the value from lags 1 to k of both series, the restricted one only from its own. An F test compares the two; df1 = k, df2 = residual degrees of freedom of the unrestricted model.
Choosing k
- k is the number of lags. Default: the period with a season, otherwise 3. A whole number from 1 up to a quarter of the series is allowed.
- The result holds for exactly this k. Trying several k and taking the smallest p is wrong: it makes the p-values too small.
- A k that is too large costs cases and power; one that is too small leaves out longer relations.
When the test is blocked
- The two series must have the same length and the same points in time.
- If values are missing in one series, Statable does not calculate and fills in nothing.
- Fewer than 30 values, or one of the series has only one value (all values equal).
- If the lags of the two series cannot be told apart (they depend on each other), the test does not work with this k.
Trap: leading is not a cause
The test only shows that earlier values of one series help to predict the other. It does not mean more. A third influence can drive both series, and one series can lead because people expect a change. The name "Granger causality" is misleading.
Trap: stationarity
Both series should be stationary, that is, without a trend and without a wandering centre. Otherwise the p-values are unreliable. Statable shows the KPSS value for each series and compares it with the limit 0.463 (there is no p-value for it). Above the limit the series does not look stationary, and the series should be differenced beforehand. Statable does not difference by itself; the differences are created as separate columns in the assistant "Shift and smooth".
Reading the result
- One sentence for each direction: earlier values of A help (or do not clearly help) to predict B, with F, df and p. "A → B" means: do earlier values of A help to predict B?
- No clear contribution does not mean that there is none; with short series the test has little power.
- A clear contribution in both directions is possible and often points to a common influence.
Example
Yearly egg production and number of chickens, k = 3: earlier egg values help to predict the chickens (F(3, 44) = 5.41, p = .003); the other way round they do not (F(3, 44) = 0.59, p = .624). That is a hint about the order in time, not proof of which came first. Second example: petrol price and drivers (raw values, k = 12): F(12, 155) = 1.42, p = .164. After first differences with k = 3: F(3, 181) = 0.67, p = .575.
Reporting the result
A Granger test with k = 3 lags showed that earlier egg values predict the chickens beyond their own past, F(3, 44) = 5.41, p = .003; in the opposite direction no clear contribution appeared, F(3, 44) = 0.59, p = .624. The result holds for k = 3 and says nothing about cause and effect.
Sources
Granger, C. W. J. (1969). Investigating causal relations by econometric models and cross-spectral methods. Econometrica, 37, 424-438.