*! version 1.0.1 21aug2026

Title

gvar overid -- LR test of over-identifying restrictions on beta

Syntax

gvar overid [using filename] [, options]

options

list print each unit's beta layout and stop.

free(spec) coefficients left freely estimated, as free(usa 3 euro 2). Feeds nunrestrpar.

replace install the restricted estimates in the model.

nosummary suppress the table.

saving(name) save the results matrix.

Description

gvar overid re-estimates chosen country models with the cointegrating
vectors held at values you supply, and reports the likelihood-ratio test
against the unrestricted fit:

LR = -2 (logL restricted - logL unrestricted)
d.f. = rows(beta) x rank - rank^2 - free parameters

The rank^2 term removes the just-identifying normalisation, so only
genuinely over-identifying restrictions enter the degrees of freedom.

Options

using filename supplies the restrictions on beta, one row per
element of the layout. Every row of the layout must appear in the file --
list prints it, and starting there rather than guessing is the only
practical way to write the file.

list prints the layout of beta for every unit and stops. Run it first.

free(spec) names elements left unrestricted, when it is easier to say what
is free than what is fixed.

replace allows an existing output file to be overwritten;
saving(name) writes the test results to a dataset;
nosummary suppresses the report.

This command needs the cointegrating vectors, so it is defined only after
gvar estimate. It refuses after
gvar bayes, which fits a VARX in levels and imposes no rank --
there is no beta to test. The refusal is deliberate: beta would
otherwise still hold whatever an earlier ML fit left in memory, and the test would
run and report a plausible number about a model that no longer exists.

What the LR test conditions on. The statistic tests the restrictions given
the rank. It says nothing about whether the rank itself is right, and an
over-identification test that comfortably accepts a theory at an overstated rank
is a common way to be misled. Settle the rank with gvar coint
first, and read gvar solve's unit-root count as the
cross-check.

Remarks

The restriction file has one row per restricted coefficient with
variables unit, relation, term and value. term
names a row of beta: a domestic variable, a foreign variable written
name*, or _trend (case 4) or _cons (case 2). Run
gvar overid, list first to see the layout.

Every row of a restricted unit's beta must be supplied. The restricted
estimator takes beta as given and estimates everything else conditional
on it, so a partially specified vector is not meaningful. Coefficients you
want estimated freely are declared through free(), which only adjusts
the degrees of freedom.

Read the chi-squared p-value with care. The Toolbox does not use it: it
takes the critical values from the bootstrap, because the country models are
estimated conditional on weakly exogenous regressors whose own uncertainty the
asymptotic distribution ignores.

A useful check. Imposing a unit's own fitted beta is a restriction that
binds at the unrestricted optimum, so it must give LR = 0. That is a quick way
to confirm your file is laid out correctly before imposing anything real.

Examples

. gvar overid, list
. gvar overid using myrestrictions.dta
. gvar overid using myrestrictions.dta, free(usa 3) replace

Stored results

gvar overid stores the following in r():

r(overid) LR, d.f., p, and both log likelihoods per unit

r(nunits) units restricted

r(nrej) rejections at 5 per cent

Source

Toolbox overid_restr.m, mlcoint_r.m; the test at gvar.m:1479.

Author

Dr Merwan Roudane

merwanroudane920@gmail.com

https://github.com/merwanroudane