Perform bootstrap tests based on the t-statistic for each fixed effect in order to calculate approximate p-values.
bootstrap_pvals(
model,
type,
B,
resample = NULL,
reb_type = NULL,
hccme = NULL,
aux.dist = NULL
)# S3 method for merMod
bootstrap_pvals(
model,
type,
B,
resample = NULL,
reb_type = NULL,
hccme = NULL,
aux.dist = NULL
)
# S3 method for lme
bootstrap_pvals(
model,
type,
B,
resample = NULL,
reb_type = NULL,
hccme = NULL,
aux.dist = NULL
)
A tibble giving the table of coefficients from the model summary with a column appended containing bootstrap p-values.
The model object you wish to bootstrap.
A character string indicating the type of bootstrap that is being
requested. Possible values are "parametric"
, "residual"
,
"case"
, "wild"
, or "reb"
(random effect block bootstrap).
The number of bootstrap resamples.
A logical vector specifying whether each level of the model should be resampled in the cases bootstrap. The levels should be specified from the highest level (largest cluster) of the hierarchy to the lowest (observation-level); for example for students within a school, specify the school level first, then the student level.
Specification of what random effect block bootstrap version to
implement. Possible values are 0
, 1
or 2
.
either "hc2"
or "hc3"
, indicating which
heteroscedasticity consistent covariance matrix estimator to use.
one of "mammen"
, "rademacher"
, "norm"
,
"webb"
, or "gamma"
indicating which auxiliary
distribution to draw the errors from
The bootstrap test compares the fitted model specified by the user to reduced models that eliminate a single fixed effect, the same comparison summarized by the table of coefficients in the summary. The bootstrap p-value is then calculated as $(n_extreme + 1) / (B + 1)$.
Davison, A., & Hinkley, D. (1997). Tests. In Bootstrap Methods and their Application (Cambridge Series in Statistical and Probabilistic Mathematics, pp. 136-190). Cambridge: Cambridge University Press. doi:10.1017/CBO9780511802843.005
if (FALSE) {
# This takes a while to run
bootstrap_pvals.merMod(jsp_mod, type = "wild", B = 1000, hccme = "hc2", aux.dist = "mammen")
}
Run the code above in your browser using DataLab