- object
An object of class lavaan
.
- h0
An object of class lavaan
. The restricted
model.
- h1
An object of class lavaan
. The unrestricted
model.
- R
Integer. The number of bootstrap draws.
- type
If "ordinary"
or "nonparametric"
, the usual (naive)
bootstrap method is used. If "bollen.stine"
, the data is first
transformed such that the null hypothesis holds exactly in the resampling
space. If "yuan"
, the data is first transformed by combining data and
theory (model), such that the resampling space is closer to the population
space. Note that both "bollen.stine"
and "yuan"
require the data
to be continuous. They will not work with ordinal data. If
"parametric"
, the parametric bootstrap approach is used; currently, this
is only valid for continuous data following a multivariate normal distribution.
See references for more details.
- FUN
A function which when applied to the lavaan
object returns a vector containing the statistic(s) of interest.
The default is FUN="coef"
, returning the estimated values of the
free parameters in the model.
- ...
Other named arguments for FUN
which are passed
unchanged each time it is called.
- verbose
If TRUE
, show information for each bootstrap draw.
- keep.idx
If TRUE
, store the indices of each bootstrap run (i.e.,
the observations that were used for this bootstrap run) as an attribute.
- return.LRT
If TRUE
, return the LRT values as an attribute to the pvalue.
- parallel
The type of parallel operation to be used (if any). If
missing, the default is "no"
.
- ncpus
Integer: number of processes to be used in parallel operation.
By default
this is the number of cores (as detected by parallel::detectCores()
)
minus one.
- cl
An optional parallel or snow cluster for use if
parallel = "snow"
. If not supplied, a cluster on the local machine is
created for the duration of the bootstrapLavaan
or bootstrapLRT
call.
- iseed
An integer to set the seed. Or NULL if no reproducible results are
needed. This works for both serial (non-parallel) and parallel settings.
Internally, RNGkind()
is set to "L'Ecuyer-CMRG"
if
parallel = "multicore"
. If parallel = "snow"
(under windows),
parallel::clusterSetRNGStream()
is called which
automatically switches to "L'Ecuyer-CMRG"
. When iseed
is not
NULL, .Random.seed
(if it exists) in the global environment is
left untouched.
- h0.rmsea
Only used if type="yuan"
. Allows one to do the Yuan
bootstrap under the hypothesis that the population RMSEA equals a specified
value.
- double.bootstrap
If "standard"
the genuine double bootstrap is
used to compute an additional set of plug-in p-values for each boostrap sample.
If "FDB"
, the fast double bootstrap is used to compute second level
LRT-values for each bootstrap sample. If "no"
, no double bootstrap is
used. The default is set to "FDB"
.
- double.bootstrap.R
Integer. The number of bootstrap draws to be use for
the double bootstrap.
- double.bootstrap.alpha
The significance level to compute the adjusted
alpha based on the plugin p-values.