*! version 1.0.1 21aug2026

Title

gvar datasets -- the example data shipped with the package

Description

The package ships the data needed to reproduce the GVAR Toolbox's own demo,
converted from the original workbook and R sources. Every example in the help
files runs on it.

The main panels

gvar_demo26.dta 33 countries with the eight euro-area members
aggregated into a single euro unit, giving 26 units and K = 136;
quarterly 1979Q2-2013Q1, six domestic variables (y Dp eq ep r lr) and
three commodity prices (poil pmat pmetal). This is the Toolbox's own
demo model, and the panel every example in this package uses.

Specification and weights

gvar_demospec.dta the full specification grid recovered from the
Toolbox workbook: per unit and variable, the dv, fv and gv
flags, the lag orders p and q, the deterministic case and
the published rank.

gvar_flows.dta bilateral trade flows by year, in long form
(home, partner, year, trade).

gvar_demoagg.dta the crosswalk mapping the eight euro-area
members onto the euro aggregate. Required: the aggregate never appears
in the raw flow data.

Critical values are in the code, not in a dataset

The 648 Pesaran-Shin-Smith (2000) critical values used by
gvar coint -- for the Johansen tests with I(1) weakly
exogenous regressors, indexed by deterministic case, n - r and k --
are held in the Mata engine rather than in a shipped dataset. They are
constants, so nothing is gained by putting them in a file that can go missing:
gvar coint used to refuse with r(601) if it did.

No dataset is installed with the package. SSC caps a package description
at 100 lines, and listing 26 data files put this package at 114. Fetch them
instead, with one command:

. gvar getdata, list

. gvar getdata demo, from(ssc) pkg(package)

Nothing was dropped. Every dataset described on this page is still
available -- it arrives when you ask rather than at install time. See
gvar getdata, which also records why the arrangement is
this way and quotes the archive maintainer's own remedy.

Reproducing the demo

. use gvar_demo26
. gvar setup y Dp eq ep r lr, unit(country) time(quarter) ///
global(poil pmat pmetal) gendog(poil=usa pmat=usa pmetal=usa) ///
spec(gvar_demospec.dta)
. gvar weights using gvar_flows.dta, flow(trade) source(partner) ///
destination(home) year(year) years(2009 2011) type(1) ///
map(gvar_demoagg.dta)
. gvar foreign
. gvar estimate, vce(nwest)
. gvar solve

This reproduces the Toolbox's demo settings: fixed trade weights averaged over
2009-2011, AIC lag selection with maximum p = 2 and q = 1,
deterministic case 4 throughout, and the published cointegrating ranks. The
solved model is stable with 69 unit roots against K = 136 and a total rank of
66.

A note on the source data

The original workbook uses 123456789 as its missing-value marker. That
is converted to Stata missing on import. Read as data it produces constant
columns, singular residual covariances and fabricated test results, so if you
build your own panel from the same workbook, check for it.

Author

Dr Merwan Roudane

merwanroudane920@gmail.com

https://github.com/merwanroudane