*! version 2.3.8 13aug2021

*! Sebastian Kripfganz, www.kripfganz.de

Title

xtdpdgmm postestimation -- Postestimation tools for xtdpdgmm

Postestimation commands

The following postestimation commands are of special interest after xtdpdgmm:

Command Description

estat serial perform test for autocorrelated residuals

estat overid perform tests of overidentifying restrictions

estat hausman perform generalized Hausman test

estat mmsc obtain model and moment selection criteria

* underid underidentification tests

* overid overidentification tests

* These community-contributed commands need to be installed separately.

The following standard postestimation commands are available:

Command Description

estat VCE and estimation sample summary

predict predictions, residuals, influence statistics, and other diagnostic measures

Syntax for predict

predict [type] newvar [if] [in] [, statistic]

predict [type] [{stub*|newvar1 ... newvarq}] [if] [in] , iv [options]

predict [type] {stub*|newvar1 ... newvarq} [if] [in] , scores

statistic

Main
xb calculate linear prediction; the default

stdp calculate standard error of the prediction

ue calculate the combined residual

* xbu calculate prediction including unit-specific error component

* u calculate the the unit-specific error component

* e calculate the idiosyncratic error component

* iv generate instrumental variables used in the estimation

* scores calculate parameter-level scores

options

Options
# nogenerate do not generate new variables

# The option nogenerate is available only in combination with option iv.

Description for predict

predict creates a new variable containing predictions such as fitted values, standard errors, and residuals.

Options for predict

Main

xb calculates the linear prediction from the fitted model; see [R] predict. This is the default.

stdp calculates the standard error of the linear prediction; see [R] predict.

ue calculates the prediction of u_i + e_it, the combined residual; see [XT] xtreg postestimation.

xbu calculates the linear prediction including the unit-specific error component; see [XT] xtreg postestimation.

u calculates the prediction of u_i, the estimated unit-specific error component; see [XT] xtreg postestimation.

e calculates the prediction of e_it; see [XT] xtreg postestimation.

iv generates the instrumental variables that are associated with the linear moment conditions, excluding the constant term. All instrumental variables are transformed appropriately such that they become instruments for the model in levels.
This option requires that the length of the new variable list be equal to the number of linearly independent instrumental variables excluding the constant term, unless the option nogenerate is specified.
A list of the instrumental variables is displayed as well, including the constant term, if any.

scores calculates the parameter-level scores for all independent variables, the first derivatives of the criterion function with respect to the coefficients (scaled by -0.5);
see [R] gmm postestimation. This option requires that the length of the new variable list be equal to the number of independent variables including the constant term, if any.
The Windmeijer (2005) finite-sample correction is taken into account whenever appropriate. A small-sample degrees-of-freedom correction is made if option small was specified with xtdpdgmm.

Options

nogenerate displays the list of instrumental variables but does not generate new variables.

Syntax for estat

Arellano-Bond test for autocorrelated residuals

estat serial [, ar(numlist)]

Sargan-Hansen tests of overidentifying restrictions

estat overid [name], [difference]

Generalized Hausman test for model misspecification

estat hausman name [(varlist)] [, df(#) nonested]

Andrews-Lu model and moment selection criteria

estat mmsc [namelist] [, n(groups|cluster|obs) hq(#)]

where name is a name under which estimation results were stored via estimates store, and namelist is a list of such names.

Description for estat

estat serial reports the Arellano and Bond (1991) test for autocorrelation of the first-differenced residuals.
A cluster-robust version is computed if vce(robust) or vce(cluster clustvar) is specified with xtdpdgmm.

estat overid reports the Sargan (1958) and Hansen (1982) J-statistic which is used to determine the validity of the overidentifying restrictions. Two versions of the test are reported.
The first version uses the weighting matrix from the final estimation step. The second version updates the weighting matrix one more time based on the residuals from the final estimation step.
The moment functions are evaluated at the final-step estimates in any case. After xtdpdgmm with option onestep or twostep, these are the one-step or two-step estimates, respectively.

estat overid, difference reports the Sargan-Hansen statistics for the reduced models, leaving out one subset of moment conditions at a time without reestimating the weighting matrix.
It also reports the corresponding Sargan-Hansen difference statistics as proposed by Newey (1985) and Eichenbaum, Hansen, and Singleton (1988) which are used to determine the validity of the omitted subset of overidentifying restrictions.

estat overid name reports a Sargan-Hansen difference statistic as proposed by Eichenbaum, Hansen, and Singleton (1988) which is used to determine the validity of a subset of overidentifying restrictions.
It is computed as the difference between the respective J-statistics from the most recent xtdpdgmm estimation results and the estimation results stored as name by using estimates store.

estat hausman reports a generalized Hausman (1978) test for model misspecification by comparing the coefficient estimates of varlist from the most recent xtdpdgmm estimation results
to the corresponding coefficient estimation results stored as name by using estimates store. By default, the coefficients of all indepvars are contrasted, excluding the constant term.
This generalized test does not require one of the estimators to be efficient. It uses the cluster-robust variance-covariance estimator for the test statistic suggested by White (1982)
that is computed using the parameter-level scores; see [R] suest.

estat mmsc reports the Akaike (AIC), Bayesian (BIC), and Hannan-Quinn (HQIC) versions of the Andrews and Lu (2001) model and moment selection criterion.
If namelist is specified, it lists the criteria for the most recent xtdpdgmm estimation and all estimations specified in namelist, previously stored by using estimates store.

Options for estat

ar(numlist) with estat serial specifies the orders of serial correlation to be tested. The default is ar(1 2).

difference with estat overid requests to report Sargan-Hansen difference statistics for a subset of the overidentifying restrictions. This option requires that option overid was specified with xtdpdgmm.

df(#) with estat hausman specifies the degrees of freedom for the test.
The default is the difference in the number of overidentifying restrictions from the two estimations or the number of contrasted coefficients, whichever is smaller.

nonested with estat hausman specifies that the two estimators are not nested in terms of the moment conditions they employ. This option implies that the degrees of freedom for the test equal the number of contrasted coefficients.

n(groups|cluster|obs) with estat mmsc specifies whether the penalty term for the MMSC-BIC and MMSC-HQIC criteria is calculated based on the number of groups, n(groups),
the number of clusters, n(cluster), or the number of observations, n(obs). The default is n(cluster) if option vce(cluster clustvar) was specified with xtdpdgmm, and n(groups) otherwise.

hq(#) with estat mmsc specifies the Hannan-Quinn scaling factor for the correction term of the MMSC-HQIC criterion. The default is hq(1.01).

Remarks for estat

The overidentification tests are asymptotically invalid after xtdpdgmm with option onestep if the one-step weighting matrix is not optimal.
This is true even for the version of the test with updated weighting matrix because the one-step estimates remain inefficient.

The Sargan-Hansen difference test statistics reported by estat overid, difference are guaranteed to be nonnegative because all statistics are based on the same weighting matrix from the full model.
This is not the case when calling estat overid with a name of stored estimation results. Asymptotically, both versions are equivalent.

For the Sargan-Hansen difference test statistic to be valid, the two estimators need to be nested in terms of the moment conditions they employ. When calling estat overid with a name of stored estimation results,
it is the user's responsibility to verify that name is indeed nested in the last estimated model, or vice versa. The test statistic is computed as the difference of Sargan-Hansen J-statistics from the two estimations,
subtracting the J-statistic with the smaller degrees of freedom from the one with the larger degrees of freedom.

The generalized Hausman test can be used as an asymptotically equivalent test to the Sargan-Hansen difference test if the two estimators are nested
and the number of the excluded overidentifying restrictions does not exceed the number of contrasted coefficients. This test statistic is guaranteed to be nonnegative but it might have poor coverage in finite samples.

The Andrews-Lu model and moment selection criteria can be used to find an optimal model among competing specifications.
These criteria combine the Sargan-Hansen test statistic with a bonus term that rewards fewer coefficients for a given number of moment conditions or more moment conditions for a given number of coefficients.
Smaller values of the model and moment selection criteria are preferred.

Example

Setup

. webuse abdata

Two-step difference GMM estimator with predetermined covariates

. xtdpdgmm L(0/1).n w k, gmm(L.n w k, l(1 4) c) m(d) two vce(r)

. estimates store ab

Arellano-Bond test for autocorrelation of the first-differenced residuals

. estat serial, ar(1/3)

Sargan-Hansen test for the validity of the overidentifying restrictions

. estat overid

Two-step system GMM estimator with predetermined covariates

. xtdpdgmm L(0/1).n w k, gmm(L.n w k, l(1 4) c m(d)) iv(L.n w k, d) two vce(r) overid

Sargan-Hansen difference test for the additional level moment conditions

. estat overid, difference

. estat overid ab

Generalized Hausman test for the additional level moment conditions

. estat hausman ab

Andrews-Lu model and moment selection criteria

. estat mmsc ab

Instrumental variables used in the estimation

. predict double iv*, iv

Replication of the system GMM estimates with the generated instruments

. xtdpdgmm L(0/1).n w k, iv(iv*) two vce(r)

Author

Sebastian Kripfganz, University of Exeter, http://www.kripfganz.de

References

Andrews, D. W. K., and B. Lu. 2001.
Consistent model and moment selection procedures for GMM estimation with application to dynamic panel data models.
Journal of Econometrics 101: 123-164.

Arellano, M., and S. R. Bond. 1991.
Some tests of specification for panel data: Monte Carlo evidence and an application to employment equations.
Review of Economic Studies 58: 277-297.

Eichenbaum, M. S., L. P. Hansen, and K. J. Singleton. 1988.
A time series analysis of representative agent models of consumption and leisure choice under uncertainty.
Quarterly Journal of Economics 103: 51-78.

Hansen, L. P. 1982.
Large sample properties of generalized method of moments estimators.
Econometrica 50: 1029-1054.

Hausman, J. A. 1978.
Specification tests in econometrics.
Econometrica 46: 1251-1271.

Newey, W. K. 1985.
Generalized method of moments specification testing.
Journal of Econometrics 29: 229-256.

Sargan, J. D. 1958.
The estimation of economic relationships using instrumental variables.
Econometrica 26: 393-415.

White, H. L. 1982.
Maximum likelihood estimation of misspecified models.
Econometrica 50: 1-25.

Windmeijer, F. 2005.
A finite sample correction for the variance of linear efficient two-step GMM estimators.
Journal of Econometrics 126: 25-51.