*! version 1.0.1 21aug2026

Title

gvar gc -- Granger and instantaneous causality within a country model

Syntax

gvar gc , cause(varlist) [options]

options

cause(varlist) the variables whose lags are excluded under the null. Required.

effect(varlist) the equations they are excluded from. Optional; the source excludes them from every non-cause equation, which is the default here.

units(list) which units. Default all that have the variables.

lags(#) lag order of the VAR. Default is each unit's own p.

flags(#) the foreign block enters at lags 0 to flags-1. Default 3.

vce(string) oim or robust. Default oim.

nosummary suppress the table.

saving(name) save the results matrix.

Description

gvar gc tests whether the lags of one set of a unit's own variables
enter the equations of the others, twice: once in a plain VAR of the unit's
variables and once in a VARX that carries the foreign block as exogenous
regressors. It also reports the instantaneous-causality test that accompanies
the Granger one in the source.

Reporting both specifications is the point. It shows whether conditioning on
the rest of the world overturns a within-country causal reading.

Options

cause(spec) and effect(spec) name the two sides of the hypothesis, as
unit:variable with * wildcards. units(spec) restricts which
units are considered.

lags(#) the lag order of the test, and flags(#) the lags of the
foreign variables carried in the auxiliary regression. Default 3.

vce(string) the standard errors underlying the Wald statistic.

graph, name(), saving() and nosummary as elsewhere.

What this does and does not say. Granger causality here is a statement about
predictive content in the reduced form, not about transmission mechanisms. In a
GVAR every variable is connected to every other through the link matrices, so a
rejection is easy to obtain and tells you less than it appears to.
gvar irf and gvar fevd are where magnitude and
direction live; this is a screening device.

Remarks

On effect(). The source has no such argument: it restricts the cause lags
in every equation except the cause's own, so the effect set is all non-cause
variables and the first degree of freedom follows from that. Supplying
effect() narrows the test and is a generalisation of the source rather
than part of it.

On the degrees of freedom. The second is K x obs - length(PI), the
system residual count, not the single-equation one. The p-value therefore
differs from what a single-equation F would give, and that is the source's
choice, faithfully reproduced.

On vce(). oim is the reference implementation's own default and is
exact. robust is a standard HC0 sandwich, not a port of the
sandwich package that GVARX passes in, and is labelled as such in the
output.

What the demo shows. Testing r to y, conditioning on the
foreign block flips the conclusion for 6 of 25 units. Several countries show
domestic interest rates Granger-causing output in a closed-economy VAR and
lose it once the rest of the world enters - the rate was proxying for global
conditions.

Examples

. gvar gc, cause(r) effect(y)
. gvar gc, cause(r) units(usa euro japan)
. gvar gc, cause(eq) flags(3) vce(robust)

Stored results

gvar gc stores the following in r():

r(gc) the statistics, one row per unit

r(nvar) rejections in the plain VAR

r(nvarx) rejections in the VARX

r(nflip) units where the two disagree

r(nunits) units tested

r(nskip) units lacking one of the variables

Source

GVARX .grangerGVAR; the test itself is vars causality().

Author

Dr Merwan Roudane

merwanroudane920@gmail.com

https://github.com/merwanroudane