bsfeistest {feisr} | R Documentation |
Bootstrapped Regression Test
Description
Estimates a bootstrapped Hausman test for fixed effects individual slope models.
Usage
bsfeistest(
model = NA,
type = c("all", "bs1", "bs2", "bs3"),
terms = NULL,
rep = 500,
seed = NULL,
prog = TRUE,
...
)
Arguments
model |
an object of class " |
type |
one of " |
terms |
An optional character vector specifying which coefficients should be jointly tested.
By default, all covariates are included in the Wchi-squared test. For " |
rep |
the number of repetitions to be used in bootstrapping (default is 500). |
seed |
the seed used for random sampling in bootstrapping. Needs to be a valid integer. If not specified, the current seed is used. |
prog |
... logical. If |
... |
further arguments. |
Details
The function computes a bootstrapped version of the Hausman test (Hausman 1978). Pairs cluster bootstrapping (Cameron et al. 2008; Ruettenauer and Ludwig 2020) is used to obtain the empirical variance-covariance matrix of the estimators, either for FEIS and conventional FE, convention FE and RE, or FEIS and RE.
type="bs1"
estimates a bootstrapped Hausman test comparing fixed effects individual slope
models and conventional fixed effects models. In this case, bsfeistest
tests for
inconsistency of the convetional FE model due to heterogeneous slopes.
type="bs2"
estimates a bootstrapped version of the well-known Hausman test comparing conventional
fixed effects models against random effects models.
type="bs3"
estimates a bootstrapped Hausman directly comparing FEIS against RE, thereby testing
for inconsistency of the RE model due to either heterogeneous slopes or time-constant omitted heterogeneity.
Bootstrapping is perfomed by resampling with replacement while keeping the number of groups identical to
the number of groups in the original dataset. A wald test from aod package is used to perform a Wald
chi-squared test on the differences between coefficients.
Value
An object of class "feistest
", containing the following elements:
wald_feis |
an object of class " |
wald_fe |
an object of class " |
wald_re |
an object of class " |
vcov1 |
the empirical (bootstrapped) variance-covariance matrix of the
coefficients obtained from FEIS and FE ( |
vcov2 |
the empirical (bootstrapped) variance-covariance matrix of the
coefficients obtained from FE and RE ( |
vcov3 |
the empirical (bootstrapped) variance-covariance matrix of the
coefficients obtained from FEIS and RE ( |
bscoef.feis |
a matrix containing the estimated FEIS coefficients of each bootstrap run. |
bscoef.fe |
a matrix containing the estimated FE coefficients of each bootstrap run. |
bscoef.re |
a matrix containing the estimated RE coefficients of each bootstrap run. |
call |
the matched call. |
formula |
an object of class " |
type |
the type of performed test(s). |
sample |
a list containing the IDs sampled in each run. |
seed |
the seed used for bootstrapping. |
terms |
character vector of covariates are included in the Wchi-squared test. |
References
Cameron AC, Gelbach JB, Miller DL (2008).
“Bootstrap-Based Improvements for Inference with Clustered Errors.”
Review of Economics and Statistics, 90(3), 414–427.
ISSN 0034-6535, doi: 10.1162/rest.90.3.414.
Hausman JA (1978).
“Specification Tests in Econometrics.”
Econometrica, 46(6), 1251–1271.
ISSN 00129682.
Ruettenauer T, Ludwig V (2020).
“Fixed Effects Individual Slopes: Accounting and Testing for Heterogeneous Effects in Panel Data or Other Multilevel Models.”
Sociological Methods and Research, OnlineFirst.
ISSN 0049-1241, doi: 10.1177/0049124120926211.
See Also
summary.feistest
, feistest
,
feis
, plm
,
phtest
Examples
data("mwp", package = "feisr")
## Not run:
feis.mod <- feis(lnw ~ marry + enrol | year,
data = mwp, id = "id", robust = TRUE)
bsht <- bsfeistest(feis.mod, type = "bs1", rep = 100, seed = 1234)
summary(bsht)
## End(Not run)