*! version 1.0.2 27sept2020

Title

underid -- Postestimation tests of under- and over-identification after linear IV estimation

Contents

Syntax

Description

Options

Classical (unrobust) tests

Robust tests

Underidentification examples

Overidentification examples

Stored results

References

Syntax

underid
[, options]

Supported estimators

ivregress instrumental variables (IV/2SLS), LIML, GMM

ivreg2 instrumental variables (IV/2SLS), LIML, 2-step GMM, CUE GMM

xtivreg panel IV for random effects (G2SLS and EC2SLS), fixed effects, between effects, first differences

xtivreg2 panel IV (IV/2SLS, LIML, 2-step GMM, CUE GMM) for fixed effects, between effects, first differences

xtabond2 dynamic panel data models (must be called with the svmat option)

xtdpdgmm dynamic panel data models

xthtaylor panel IV Hausman-Taylor and Amemiya-MaCurdy random-effects estimators

Tests

(default) Anderson canonical correlations test (iid default)

jcue Cragg-Donald test, J statistic from GMM CUE (robust default)

jgmm2s J statistic from 2-step GMM (robust) or 2SLS (iid)

j2l J2L statistic (robust only)

j2lr J2LR statistic (robust only)

kp Kleibergen-Paap test (robust only)

Main options

underid underidentication test (default)

overid overidentification test

sw Sanderson-Windmeijer underidentification tests for endogenous regressors

wald report Wald-type instead of default LM-type test

lr report LR instead of default LM-type test (Anderson test only)

center specifies that the moments in the robust VCE are centered so that they have mean zero
(will override no centering in original estimation)

nocenter specifies that the moments in the robust VCE should not be centered
(will override centering in original estimation)

small use a small-sample adjustment: instead of N, for LM-type tests use N-K1, and for Wald-type tests use N-L-K1,
where L is the number of instruments Z and K1 is the number of exogenous regressors including the constant

VCE options

(default) take VCE options from IV estimation

vceopt(VCE options): override IV VCE specification with user-specified option list selected from the following:

iid report tests using unrobust (standard) VCE that assumes iid

robust report tests that are robust to arbitrary heteroskedasticity

cluster(varlist) report tets that are robust to heteroskedasticity and within-cluster correlation; 2-way clustering is supported

bw(#) report tests that are autocorrelation-consistent (AC)
or (with the robust option) heteroskedasticity- and autocorrelation-consistent (HAC),
with bandwidth equal to #

kernel(string) specifies the kernel to be used for AC and HAC covariance estimation (default=Bartlett a.k.a. Newey-West)

For more details on available VCE options, see help avar or ivreg2.

Rarely-used options

rkopt(options) additional options to pass to ranktest, e.g., optimization settings; see ranktest

noisily report output of internal call to ranktest

noreport suppress detailed output relating to xtabond2

nocollin don't check X/Y/Z for collinearities

nopartial keep the exogenous regressors X in the list of both endogenous regressors Y and instruments Z

usemeans (after xtivreg or xthtaylor only) use means instead of demeaned exogenous regressors as IVs

repstata (after xtivreg or xthtaylor only) use Stata method for exogenous regressors in random effects models

maineq(estimator) (requires ivreg2) re-estimate and report main equation; estimator may be iv, gmm2s or cue

underid requires the Stata module ranktest, version 02.0.03 or higher;
click here to install
or type "ssc install ranktest" from inside Stata.

Additional robust covariance options accepted by avar may be included as options to underid.
See help avar, ivreg2 or ranktest for details.

Description

underid reports tests of underidentification and overidentification
after estimation of single-equation linear instrumental variables (IV) models,
including static and dynamic panel data models.

Denote by y the dependent variable in a linear IV equation,
Y the set of K endogenous regressors,
Z the set of L excluded instruments,
and X any exogenous regressors ("included instruments") including the constant.
The full model is y = Y*beta + X*delta + e.
We assume that X is partialled out of y, Y and Z;
this leads to simpler expressions (and is also how underid and ranktest work internally).
Denote the first-stage coefficients by Pi and their OLS estimates by Pihat = inv(Z'Z)*Z'Y.
The rank condition required for identification is that E(Z'Y) is full column rank.
By default, underid reports a test of the rank of E(Z'Y)
or, equivalently, a test of the rank of Pi.
The null hypothesis is H0:rank(Pi)=K-1, i.e., rank reduction of 1.
The test statistic reported is distributed as chi-square with (L-K+1) degrees of freedom
(see help ranktest).
Rejection (a large test statistic) indicates that the model (beta) is identified
(the excluded instruments are "relevant").
Failure to reject indicates that the model is underidentified.

The same tests of underidentification apply
whether the model is estimated by IV (instrumental variables),
GMM (generalized method of moments)
or LIML (limited information maximum likelihood).
The tests can also be applied to, e.g., static or dynamic panel data models.
The way such panel data models are estimated is that
the data are first transformed by mean-differencing (e.g., fixed effects estimators),
quasi-differencing (e.g., random effects estimators)
or first-differencing (e.g., dynamic panel data estimators),
any required instrument sets constructed,
and then the model is estimated using linear IV or GMM on the transformed data.
After estimation by an IV/GMM panel data model,
underid performs these operations to obtain the same transformed data
and then reports a test of the rank of E(Z'Y)
where Z and Y are the transformed instruments and endogenous regressors, respectively.

Overidentification tests in IV/GMM models are available when L>K,
i.e., the model is overidentified.
The usual intepretation is that the null hypothesis is H0:E(Ze)=0,
i.e., that the excluded instruments Z are orthogonal to the disturbance e.
Rejection (a large test statistic) indicates that the orthogonality conditions are not satisfied
and the model is misspecified.

Overidentification and underidentification are closely connected.
Specifically, consider the model above
where the exogenous regressors X have already been partialled out: y = Y*beta + e .
Windmeijer (2018) shows that a test for underidentification in this model
can be interpreted as a test for overidentification
in the auxiliary specification y1 = Y2*delta + u,
where (y1 Y2) = Y.

underid works by assembling the sets of variables (dependent, endogenous, exogenous, instruments)
and then calling ranktest to obtain the appropriate test statistic.
The maineq(estimator) option will use these variable lists to re-estimate and report the main equation;
this can be useful as a cross-check.
The test statistics reported by underid are based on appropriately re-parameterized linear IV equations;
see ranktest for details.
The returned results from underid include the initial and final coefficient estimates for this equation
(initial will differ from final if the estimation method is iterative).

Classical (unrobust) tests

Underidentification:

The default underidentification test reported by underid
for the classical (unrobust, iid assumed) case
is the LM version of the Anderson (1951) canonical correlations test.
Denote by ev_1 < ev_2 < ... < ev_K
the eigenvalues of (Y'*P_z*Y)*inv(Y'Y) where P_z is the projection matrix Z*inv(Z'Z)*Z',
after partialling out X and ordering the eigenvalues from smallest to largest.
The eigenvalues correspond to the squared canonical correlations between Y and Z (Anderson 1951).
The LM version of the Anderson test statistic for a rank reduction of 1 is simply N*ev_1,
i.e., the sample size N times the square of the smallest canonical correlation.
The original LR (likelihood ratio) version of Anderson's test
is -N*ln(1-ev_1) and can be obtained via the lr option.
The LM version of the Cragg-Donald (1993) test is identical to Anderson's test.
The Wald version of the CD test statistic is equal to N*ev_1/(1-ev_1)
and can be obtained using the wald option.
Both the Anderson and Cragg-Donald tests are score tests.
All these test statistics are distributed as chi-squared variates
with (L-1)*(K-1) degrees of freedom under the null hypothesis that rank(E(Y'Z))=K-1.

A 2SLS-based underidentification test can be obtained with the jgmm2s option.
This test is non-invariant and depends on the order of variables in Y = [y_1 y_2 ... y_K] .
The reason is that the test is obtained as the Sargan J test for overidentification
for estimation by 2SLS of the model where the dependent variable is y_1
and the endogenous regressors are [y_2 ... y_K] .
This is in contrast to the Anderson and Cragg-Donald statistics,
which can be obtained as a J test statistic
when the model is estimated by LIML (limited information maximum likelihood).
The Anderson and CD statistics are score tests
and, unlike the 2SLS-based J test,
invariant to the choice of which of [y_1 y_2 ... y_K]
is chosen to be the dependent variable.
The Sanderson-Windmeijer test (see below)
of underidentification of a specific y_k
is the 2SLS-based underidentification test
obtained by specifying y_k as the dependent variable
and the K-1 remaining variables Y{-k} as the endogenous regressors.
See below and Windmeijer (2018) for discussion.

Note: In the special case of a single endogenous regressor y_1,
(1) the LM versions of the Anderson and 2SLS-based underidentification statistics are identical;
(2) the Wald versions of the CD and 2SLS-based underidentification statistics are identical.

Overidentification:

The default overidentification test reported by underid
for the classical (unrobust, iid assumed) case
is the Sargan (1958) statistic for the LIML estimator of the model y = Y*beta + e ,
where again the exogenous regressors X have already been partialled out of Z, Y and y.
Denote the LIML residuals by ehat,
the projection matrix for the instruments Z by P_z,
and the annihilation matrix I-P_z by M_z.
The Sargan statistic is N*(ehat'*P_z*ehat)/ehat'ehat
and is the LM form of a score test.
The Basmann (1960) statistic N*(ehat'*P_z*ehat)/ehat'*M_z*ehat
is essentially the Wald form of the same test
and can be obtained by the wald option.
When the lr option is specified,
underid reports the Anderson-Rubin (1950)
overidentification statistic for the LIML estimator,
defined as N*ln(ev_liml)
where ev_liml is the eigenvalue of the LIML optimization problem.
These LIML-based tests are score tests.

When the jgmm2s option is specified,
underid reports the Sargan statistic for the 2SLS estimator,
i.e., the 2SLS residuals are used for ehat.
The Basmann statistic for the 2SLS estimator
is obtained by specifying the jgmm2s and wald options together.

The Anderson and Basmann LIML-based overid tests are "undirected" rank tests
and hence have no power to reject a false null in underidentified models.
In contrast, 2SLS-based overid tests are not rank tests
and still possess power to reject a false null in underidentified models
(although they are no longer consistent tests in this case).

Underidentification of individual endogenous regressors:

If the model is found to be underidentified,
then the Sanderson-Windmeijer (SW) conditional underidentification tests
can provide further information about
which endogenous explanatory variables are poorly predicted by the instruments,
controlling for the prediction of the other endogenous explanatory variables in the model.
These are 2SLS-based Sargan or Basmann tests of overidentifying restrictions
in the specifications y_k = Y_{-k}*delta_k+e_k, where Y_{-k} is Y without y_k.
Under the null that E(z_i*e_ki)=0
the SW statistic is distributed as chi-squared with (L-K+1) degrees of freedom.
Under this null, the instruments do not predict the endogenous variable y_k
after having predicted the other endogenous variables Y{-k}.
In the special case of a single endogenous regressor,
the SW statistic is identical to the 2SLS-based underidentification statistic described above.
When the sw option is specified,
SW statistics for each endogenous regressor in Y are reported
along with a standard underidentification test for the full set of endogenous regressors.
The F-test versions of the SW statistic are obtained as the Basmann test adjusted for the degrees of freedom.

Robust tests

underid will by default report statistics using a VCE
that is as "robust" as the VCE used in the linear IV/GMM estimation.
For example, if the IV/GMM equation was reported
using a VCE that is robust to arbitrary heteroskedaticity,
underid will by default report heteroskedastic-consistent test statistics.
This behavior can be overridden by the vceopt(list) option,
where list is the list of VCE options (e.g., robust).
(NB: it is also possible to provide this list directly
without enclosing it in vceopt(.),
but only if the options don't conflict with the VCE options specified in the IV model;
use of vceopt(.) is safer and recommended.)
Specification of the VCE options is the same as in
avar, ranktest and ivreg2.

The tests described below have the same limiting distributions
as those for the classical (unrobust, iid-assumed) tests described above,
and the interpretation of the tests is also the same.
The only substantive difference is the robustness of the tests,
i.e., the loosening of the iid assumption.

Underidentification:

The default robust underidentification test reported by underid
is the LM form of the robust Cragg-Donald (1993) test;
this is equivalent to specifying the jcue option.
Cragg-Donald (1993) present a test for the rank of B for the non-iid case
that is based on the Generalized Method of Moments (GMM).
Windmeijer (2018) shows that their test statistic
to a J statistic from a regression estimated using
GMM CUE (continuously-updated estimator),
where the Y variables are partitioned into
some that are treated as dependent (LHS) variables
and the remainder are endogenous (RHS) regressors.
Because it is a robust score test,
the test is invariant to the choice of which Y variables
are used as which.
See the ranktest for further details and examples.

The kp option causes underid to report
the LM form of the Kleibergen-Paap (2006) test.
This test is derived from applying the singular value decomposition (SVD)
to a normalized version of Bhat.
Kleibergen-Paap (2006) show that
the KP test statistic can be interpreted as
Anderson's canonical correlations test generalized to the non-iid case
(a non-Kronecker covariance matrix).
Windmeijer (2018) shows that the KP test statistic
can also be interpreted as a LIML-based robust score test.
He also shows that it can be obtained from an artificial regression
using the residuals from LIML estimation(s);
the LIML residuals are obtained from estimations
where the Y variables are partitioned into
some that are treated as dependent (LHS) variables
and the remainder are endogenous (RHS) regressors.
Because it is a robust score test,
the test is invariant to the choice of which Y variables
are used as which.
See the ranktest for further details and examples.

Windmeijer (2018) proposes two other robust score tests,
available in underid with the j2l or j2lr options.
Both are based on a two-step efficient GMM estimator
with the LIML estimator as the first step.
The J2L estimator uses the LIML estimates
to construct optimal instruments in the second step;
the J2LR is based on the iterative algorithm for the CUE estimator
proposed in Windmeijer (2018),
but iterating only once.
NB: neither option is available for tests after xtabond2.

A 2-step-GMM-based underidentification test can be obtained with the jgmm2s option.
As in the iid case,
this test is non-invariant and depends on the order of variables in Y = [y_1 y_2 ... y_K] .
Also as in the iid case,
the Sanderson-Windmeijer test for y_k
is obtained by specifying y_k as the dependent variable
and the K-1 remaining variables Y{-k} as the endogenous regressors.

By default, underid reports LM forms of these tests.
Wald versions can be obtained by specifying the wald option.

Note: In the special case of a single endogenous regressor y_1,
(1) the LM versions of these underidentification statistics are identical;
(2) the Wald versions of these underidentification statistics are identical.

Overidentification

The default overidentification test reported by underid for the robust case
is the J statistic for the GMM CUE estimator;
this is equivalent to using the jcue option.
By default, the LM version of the test is reported.
If wald is specified, a Wald version is reported;
this statistic is equivalent to the J statistic
for the CUE-MD (minimum distance estimator) of Magnusson (2010).

When the jgmm2s option is specified along with a robust VCE,
underid reports the Hansen-Sargan statistic for the 2-step-GMM estimator.
By default, the LM version of the test is reported;
if wald is specified, a Wald version is reported.

Underidentification of individual endogenous regressors:

Specification of the sw with a robust VCE
causes underid to report robust versions of
the Sanderson-Windmeijer test.

Options

Main options:

By default, underid will report only underidentification tests.
Calling underid with no options is equivalent to underid, underid.

Specifying underid, overid will report overidentification tests.
Specifying underid, overid underid will report both under- and overidentification tests.

The sw option requests Sanderson-Windmeijer underidentification tests for endogenous regressors.
This test is always either a 2SLS-based (in the iid case)
or a 2-step efficient GMM (in the non-iid case) J statistic.

underid by default reports LM-type tests.
Wald-type tests can be requested using the wald option.
For the Anderson test only, an LR test can be specified using the lr option.

VCE options:

The default behavior of underid is to use the same VCE specification
as that used in the original IV estimation.
An exception is dynamic panel data estimation,
where the VCE reported by under is always cluster-robust.

The vceopt(string) option can be used to override
the VCE specification original of the original IV estimation.
For example, if the original estimation used a heteroskedastic-consistent ("robust") VCE,
specifying vceopt(cluster(panelid)) will cause underid
to report cluster-robust test statistics;
specifying vceopt(iid) will cause underid
to report classical (unrobust, iid assumed) test statistics.

Rarely-used options:

nopartial keeps the exogenous regressors X in the list of both endogenous regressors Y and instruments Z
instead of partialling them out.
The main use for this is to obtain CUE coefficient estimates for the entire parameter vector
including the coefficients on X.
It is also used internally by underid to mimic the behavior of xtabond2
with the h(2) and h(3) options; see the examples below.

usemeans is relevant only for random-effects estimation with xtivreg,ec2sls or xthtaylor
where panels are unbalanced and the model includes exogenous regressors.
The underid default for these cases is to use a GLS-transformed exogenous regressor
and the demeaned regressor as an additional excluded instrument.
The usemeans option instead uses the panel mean as an additional excluded instrument.
In the case of a balance panel the two are approaches are numerically equivalent.

repstata is relevant only for random-effects estimation with xtivreg,ec2sls or xthtaylor
where panels are unbalanced and the model includes exogenous regressors.
Stata's approach in these cases is to treat a GLS-transformed exogenous regressor as endogenous
and to instrument it with the demeaned regressor and its panel mean as two excluded instruments.
The repstata option uses this same approach when calculating overidentification and underidentification tests.

maineq(estimator)reports the results of re-estimating the model using ivreg2
after any required data transformations (first differences, fixed effects, random effects, etc.).
estimator may be iv (basic IV/2SLS estimation), gmm2s (2-step feasible efficient GMM)
or cue (continuously-updated GMM).

noisily reports the output of internal calls to ranktest.
noreport suppresses the detailed lists of endogenous regressors, exogenous regressors
and instruments for xtabond2.
nocollin suppresses checks for collinearities within and between X, Y and Z.

Underidentification examples

Instrumental variables. Examples follow Hayashi 2000, p. 255.

. use http://fmwww.bc.edu/ec-p/data/hayashi/griliches76.dta, clear

. ivreg2 lw expr tenure rns smsa i.year (s iq=med kww age mrt), rob

Default: J CUE invariant underidentification test.

. underid

Reproduce ivreg2 Kleibergen-Paap invariant underid statistic.

. di e(idstat)

. underid, kp

2-step GMM-based underid statistic is not invariant to ordering of endogenous regressors.
Also illustrate use of vceopt(.); underid test is robust, main equation is not.

. qui ivreg2 lw expr tenure rns smsa i.year (s iq=med kww age mrt)

. underid, vceopt(rob) jgmm2s

. qui ivreg2 lw expr tenure rns smsa i.year (iq s=med kww age mrt)

. underid, vceopt(rob) jgmm2s

Sanderson-Windmeijer underidentification tests.

. underid, vceopt(rob) sw

Dynamic panel data using xtabond2.
Note that the xtabond2 option svmat is required,
and that this option in turn requires the Mata option matafavor to be set for speed.
Examples based partly on xtabond2 help file examples.

. use http://www.stata-press.com/data/r7/abdata.dta, clear

Two-step estimator, system estimation.

. xtabond2 n L.n L(0/1).(w k), gmm(L.(w k n), lag(1 1) eq(d)) robust twostep svmat

Default: J CUE invariant underidentification test.

. underid

Two-step estimator, no level equation, J CUE invariant underidentification test.

. xtabond2 n L.n L(0/1).(w k) yr1979-yr1984, gmm(L.(w k n), lag(1 1) orthog) iv(yr1979-yr1984) robust twostep orthog noleveleq svmat

. underid

Sanderson-Windmeijer underidentification tests.

. underid, sw

One-step estimator, diff and level equations, J CUE test; show ranktest output.

. xtabond2 n L.n L(0/1).(w k) yr1978-yr1984, gmm(L.(w k n), lag(1 1)) iv(yr1978-yr1984) robust svmat

. underid, noi

Dynamic panel data using xtdpdgmm.

. use http://www.stata-press.com/data/r7/abdata.dta, clear

Two-step estimator, system estimation; same specification as for xtabond2 above.

. xtdpdgmm n L.n L(0/1).(w k), gmm(L.(w k n), lag(1 1) m(d)) vce(r) twostep

Default: J CUE invariant underidentification test.

. underid

Reproduce results for the Arellano-Hansen-Sentana (1999) I test for underidentification
reported in Table 3 of their paper.

. xtabond2 n l.n l2.n yr1979-yr1984, gmm(n, lag(2 .)) iv(yr1979-yr1984) nolevel rob svmat

Column 1 Two-step J-test and coefficients \alpha_1 and \alpha_2:

. underid, overid jgmm2s

. mat list r(b_oid)

Column 2 CUE J-test and coefficients \alpha_1 and \alpha_2:

. underid, overid nopartial rkopt(noevorder)

. mat list r(b_oid)

Static panel data. Examples based on Stata command help files.

. webuse nlswork, clear

. tsset idcode year

. gen age2=age^2

. gen black=(race==2)

. xtivreg ln_wage age (tenure = union south), fe

LIML-based test for the iid case.

. underid

Cluster-robust J CUE and KP tests; tests are identical in this example
because there is 1 endogenous regressor and test is a test of null rank.

. underid, vceopt(cluster(idcode)) noi

. underid, vceopt(cluster(idcode)) noi kp

Overidentification examples

Instrumental variables. Examples follow Hayashi 2000, p. 255.

. use http://fmwww.bc.edu/ec-p/data/hayashi/griliches76.dta, clear

. ivreg2 lw s expr tenure rns smsa i.year (iq=med kww age mrt), rob

Report J CUE overidentification test.

. underid, overid

Reproduce ivreg2 Hansen J overid statistic.

. di e(j)

. underid, overid jgmm2s

Reproduce J and coefficient estimates for CUE.
Note the nopartial option is required in order to reproduce both the CUE estimates
of the coefficients on the exogenous regressors and the Hansen J statistic.
Coefficient estimates differ slightly because of different methods of numerical optimization.

. ivreg2 lw s expr tenure rns smsa i.year (iq=med kww age mrt), rob cue

. underid, overid nopartial rkopt(noevorder)

. mat list r(b_oid)

Dynamic panel data using xtabond2.
Note that the xtabond2 option svmat is required.

. use http://www.stata-press.com/data/r7/abdata.dta, clear

Two-step estimator, no level equation.
xtabond2 uses the default h(2) option,
and internally overid uses the nopartial option in order to reproduce the results.

. xtabond2 n L.n L(0/1).(w k) yr1979-yr1984, gmm(L.(w k n), lag(1 1)) iv(yr1979-yr1984) robust twostep noleveleq svmat

Reproduce xtabond2 Hansen J overid statistic.

. di e(hansen)

. underid, overid jgmm2s

Report J CUE overid statistic (underid default).
Suppress xtabond2-related output.
Also examine CUE coefficients and VCE for endogenous regressors.

. underid, noreport overid

. mat list r(b_oid)

. mat list r(V_oid)

Reproduce xtdpdgmm Hansen J overid statistic.

. xtdpdgmm L(0/1).n w k, gmmiv(L.n, l(1 4) c m(d)) iv(w k, d m(d)) twostep vce(robust)

. estat overid

. underid, overid jgmm2s

Report J CUE overid statistic (underid default).
Also examine CUE coefficients and VCE for endogenous regressors.

. underid, noreport overid

. mat list r(b_oid)

. mat list r(V_oid)

Static panel data. Examples based on Stata command help files.

. webuse nlswork, clear

. tsset idcode year

. gen age2=age^2

. gen black=(race==2)

Fixed effects.

. xtivreg ln_wage age (tenure = union south), fe

LIML-based tests for the iid case.

. underid, overid

Cluster-robust test.

. underid, overid vceopt(cluster(idcode))

G2SLS; note overid degrees of freedom: 2 (union, south) - 1 (tenure) = 1.

. xtivreg ln_wage age (tenure = union south), re

. underid, overid

EC2SLS; dof = 6 (mean and mean-deviation of union, south, age) - 2 (GLS transform of tenure, age) = 4.

. xtivreg ln_wage age (tenure = union south), ec2sls

. underid, overid

EC2SLS; changing the number of included exogenous variables changes the dof of the overid stat.
4 (mean and mean-deviation of union, south) - 1 (GLS transform of tenure) = 3.

. xtivreg ln_wage (tenure = union south), ec2sls

. underid, overid

Hausman-Taylor estimation; 2-step GMM J stats.
Note that underlying estimation differs from original; Stata's
xthtaylor treats GLS-transformed exogenous regressors as endogenous.
dof = 2 (exogenous time-varying age, age2) - 1 (endogenous time-invariant grade) = 1.

. xthtaylor ln_wage age age2 tenure hours black birth_yr grade, endog(tenure hours grade)

. underid, overid jgmm2s

. mat list e(b)

. mat list r(b0_oid)

As above but use repstata option; confirm underlying estimation now matches original.

. xthtaylor ln_wage age age2 tenure hours black birth_yr grade, endog(tenure hours grade)

. underid, overid jgmm2s repstata

. mat list e(b)

. mat list r(b0_oid)

Stored results

underid stores the following in r():

Scalars

r(N) number of observations

r(j_uid) chi-sq statistic for underidentification

r(df_uid) degrees of freedom of underidentification test

r(p_uid) p-value for for underidentification test

r(j_oid) chi-sq statistic for overeridentification

r(df_oid) degrees of freedom of overeridentification test

r(p_oid) p-value for for overidentification test

Macros

r(rkstat) Test statistic (passed to ranktest)

r(vceopt) Variance-covariance matrix options (passed to ranktest)

r(rkopt) Additional options (passed to ranktest)

Matrices

r(b_uid) Coefficient vector corresponding to J-based underid test

r(V_uid) VCE of coefficient vector corresponding to J-based underid test

r(S_uid) Covariance matrix of orthogonality conditions corresponding to J-based underid test

r(b0_uid) Initial coefficient vector corresponding to underid test

r(b_oid) Coefficient vector corresponding to J-based overid test

r(V_oid) VCE of coefficient vector corresponding to J-based overid test

r(S_oid) Covariance matrix of orthogonality conditions corresponding to J-based overid test

r(b0_oid) Initial coefficient vector corresponding to overid test

r(sw_uid) Sanderson-Windmeijer underidentification tests

Citation of underid

underid is not an official Stata command. It is a free contribution
to the research community, like a paper. Please cite it as such:

Schaffer, M.E., Windmeijer, F. 2020.
underid: Postestimation tests of under- and over-identification after linear IV estimation.
https://ideas.repec.org/p/bri/uobdis/18-696.html

References

Anderson, T.W. 1951. Estimating linear restrictions on regression coefficients
for multivariate normal distributions. Annals of Mathematical Statistics, Vol. 22, pp. 327-51.

Arellano, M., Hansen, L.P. and Sentana, E. 1999. Underidentification?
Econometric Society World Congress 2000 Contributed Papers 1824.
https://ideas.repec.org/p/ecm/wc2000/1824.html

Cragg, J.G. and Donald, S.G. 1993. Testing Identfiability and Specification in
Instrumental Variables Models. Econometric Theory, Vol. 9, pp. 222-240.

Kleibergen, F. and Paap, R. 2006. Generalized Reduced Rank Tests Using the Singular Value Decomposition.
Journal of Econometrics, Vol. 133, pp. 97-126.

Magnusson, L.M. 2010. Inference in limited dependent variable models robust to weak identification.
Econometrics Journal, 13:S56-S79.

Sanderson, E. and F. Windmeijer, 2016.
A weak instrument F-test in linear IV models with multiple endogenous variables.
Journal of Econometrics 190, 212-221.

Windmeijer, F. 2018. Testing Over- and Underidentification in Linear Models,
with Applications to Dynamic Panel Data and Asset-Pricing Models.
Bristol Economics Discussion Papers 18/696.
https://ideas.repec.org/p/bri/uobdis/18-696.html

Authors

Mark E Schaffer, Heriot-Watt University, UK
m.e.schaffer@hw.ac.uk

Frank Windmeijer, Oxford University, UK
frank.windmeijer@stats.ox.ac.uk