*! version 1.0 16April2019

*! Author: Volker Ludwig

Title

xtbsht -- User-written ado for Bootstrapped Hausman Test (BSHT)

Syntax

xtbsht Model A Model B [,] [keep(varlist)] [reps()] [seed()]

Description

xtbsht implements the bootstrapped version of the Hausman test, using pairwise clustered sampling (Cameron et al. 2008, Cameron and Miller 2015).
xtbsht compares estimates of two models, Model A and Model B,
and tests the Null hypothesis that there are no systematic differences in coefficients
that are common to both models. The covariance matrix of coefficients for Model A and Model B is
estimated via pairwise-clustered bootstrapping, where R samples of units are randomly
drawn from the estimation sample.

Typically, xtbsht is used to test for bias due to unobserved heterogeneity in linear models for panel data.
Often researchers want to know whether there are differences in coefficients between a standard Fixed-Effects (FE) and Random-Effects (RE) model.
After estimation of a linear Fixed-Effects models with Individual-Specific Slopes (FEIS) (Wooldridge 2010, pp. 374-381),
xtbsht can be used also to test for bias of an FE model, by comparing with FEIS estimates. In this case, xtbsht tests for inconsistency due to heterogeneous slopes of a subset of covariates.
Similarly, the BSHT can be used to test for a bias of an RE model, by comparing with FEIS estimates.

Options

Options

keep(varlist) requests that the BSHT be conducted only for the specified subset of common coefficients of Model A and Model B.

reps(num) specifies R, the number of replications to be used for bootstrapping (default value is 50 replications).

seed(num) optionally sets the seed for drawing random samples used for bootstrapping (recommended for replicability of results).

Examples

Estimate Fixed-Effects model
. xtreg ln_wage ttl_exp msp tenure year, cluster(idcode) fe
. estimates store FE

Estimate Random-Effects model
. xtreg ln_wage ttl_exp msp tenure year, cluster(idcode) re
. estimates store RE

Test FE versus RE model, 100 replications, set seed for replicability
. xtbsht FE RE, reps(100) seed(123)

Estimate Fixed-Effects model with Individual-specific Slope for total work experience
. xtfeis ln_wage msp tenure year, slope(ttl_exp) cluster(idcode)
. estimates store FEIS

Test FEIS versus FE model
. xtbsht FEIS FE, reps(100) seed(123)

Test FEIS versus RE model
. xtbsht FEIS RE, reps(100) seed(123)

References

Cameron, C. A., Gelbach, J. G., Miller, D. L. (2008). Bootstrap-Based Improvements for Inference with Clustered Errors. Review of Economics and Statistics 90: 414-427.

Cameron, C. A., Miller, D. L. (2015). A Practitioner’s Guide to Cluster-Robust Inference. Journal of Human Resources 50: 317-372.

Wooldridge, J. (2010). Econometrics of Cross Section and Panel Data, Cambridge: MIT Press, 2nd edition.

Author

Volker Ludwig
Technische Universität Kaiserslautern
ludwig@sowi.uni-kl.de

Citation

Please cite this software as follows:

Ludwig, V. (2019). XTFEIS: Stata module to estimate linear Fixed-Effects model with Individual-specific Slopes (FEIS).
https://EconPapers.repec.org/RePEc:boc:bocode:s458045