*! version 1.0.1 21aug2026

Title

gvar fevd -- forecast error variance decomposition

Syntax

gvar fevd , variable(unit:var) [options]

options

variable(unit:var) the variable decomposed. Required.

step(#) horizon. Default 24.

type(string) girf, oirf or sgirf.

top(#) how many leading contributors to show. Default 10.

shocks(spec) name the shocks to show instead of ranking them.

horizons(numlist) which horizons to print.

first(units) which units lead the ordering. For type(sgirf) this is the identifying assumption, and the block size is derived from it.

vorder(spec) the variable order inside each leading unit, one block per unit separated by ;.

vcov(string) sample keeps the estimated covariance; blockdiag zeroes every cross-unit covariance; blockdiag unit does the same but leaves one unit's cross-covariances free.

shrink shrink the correlation matrix towards the identity, intensity chosen internally.

lambda(#) set the shrinkage intensity by hand, between 0 and 1.

graph plot the contributions.

name(name) graph name.

nosummary suppress the table.

saving(name) save the decomposition.

Description

gvar fevd decomposes the forecast error variance of one variable across
all the shocks in the system, generalized or orthogonalised.

Options

variable(unitvariable) names the variable whose forecast error variance
is decomposed. Required, and it must select exactly one element: a decomposition
is read one series at a time.

Note this is the responding variable, not the shock -- the opposite of
gvar irf's shock(). The table answers "where does the
uncertainty in this series come from", so the rows are the shocks.

shocks(spec) restricts which shocks are listed, if you already know which
few matter.

step(#) the horizon, default 24, and horizons(numlist) which
horizons appear in the table.

type(girf|oirf|sgirf) the identification, as in
gvar irf. The distinction matters more here: only the
orthogonalised decomposition sums to one across shocks. The generalized one
does not, because the shocks are not orthogonal, and a generalized FEVD whose
column sums to 1.3 is not a bug.

first(units) and vorder(spec) set the leading block for
type(sgirf).

top(#) lists only the largest contributors. Default 10. With 136 shocks
the full column is unreadable and mostly zeros.

vcov(spec), shrink and lambda(#) as in
gvar irf. An orthogonalised FEVD needs a Cholesky factor, so on
the shipped demo it needs one of the last two.

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

Remarks

The generalized decomposition does not sum to one. The shocks are
correlated by construction, so the shares overlap. That is a property of the
Pesaran-Shin estimator, which defines each share against its own shock
variance, not a defect. The reported TOTAL column is the sum over all shocks
and shows how far from one it falls; a value well above one signals strong
contemporaneous correlation. Use type(oirf) for shares that do sum to
one.

The own share at horizon zero is not one either, unlike in a standard
VAR, because the reduced form carries G0^-1.

Examples

. gvar fevd, variable(euro:y) step(24) top(8)
. gvar fevd, variable(usa:y) type(oirf) shrink
. gvar fevd, variable(usa:y) shocks(usa:r usa:eq) graph

Stored results

gvar fevd stores the following in r():

r(fevd) the reported shares plus the TOTAL column

r(fevdfull) shares against every shock

r(variable) the variable decomposed

r(shocks) the shocks reported

r(type) girf, oirf or sgirf

r(step) the horizon

Source

Toolbox fevd.m.

Author

Dr Merwan Roudane

merwanroudane920@gmail.com

https://github.com/merwanroudane