runMI-deprecated {semTools} | R Documentation |
Fit a lavaan Model to Multiple Imputed Data Sets
Description
This function fits a lavaan model to a list of imputed data sets, and can
also implement multiple imputation for a single data.frame
with
missing observations, using either the Amelia package or the mice package.
Usage
runMI(model, data, fun = "lavaan", ...,
m, miArgs = list(), miPackage = "Amelia", seed = 12345)
lavaan.mi(model, data, ...,
m, miArgs = list(), miPackage = "Amelia", seed = 12345)
cfa.mi(model, data, ...,
m, miArgs = list(), miPackage = "Amelia", seed = 12345)
sem.mi(model, data, ...,
m, miArgs = list(), miPackage = "Amelia", seed = 12345)
growth.mi(model, data, ...,
m, miArgs = list(), miPackage = "Amelia", seed = 12345)
Arguments
model |
The analysis model can be specified using
lavaan::model.syntax() or a lavaan::parTable()
|
data |
A data.frame with missing observations, or a list
of imputed data sets (if data are imputed already). If runMI() has
already been called, then imputed data sets are stored in the
@DataList slot, so data= can also be an OLDlavaan.mi object
from which the same imputed data will be used for additional analyses.
|
fun |
character . Name of a specific lavaan function used to fit
model= to data= (i.e., "lavaan" , "cfa" , "sem" , or "growth" ).
Only required for runMI() .
|
... |
additional arguments to pass to lavaan::lavaan() or
lavaan::lavaanList() . See also lavaan::lavOptions() .
Note that lavaanList provides parallel computing options, as well as
a FUN argument so the user can extract custom output after the model
is fitted to each imputed data set (see Examples). TIP: If a
custom FUN is used and parallel = "snow" is requested,
the user-supplied function should explicitly call library or use
:: for any functions not part of the base distribution.
|
m |
integer . Request the number of imputations. Ignored if data= is
already a list of imputed data sets or an OLDlavaan.mi object.
|
miArgs |
Addition arguments for the multiple-imputation function
(miPackage ). The arguments should be put in a list (see example
below). Ignored if data= is already a list of imputed data
sets or an OLDlavaan.mi object.
|
miPackage |
Package to be used for imputation. Currently these
functions only support "Amelia" or "mice" for imputation.
Ignored if data is already a list of imputed data sets or an
OLDlavaan.mi object.
|
seed |
integer . Random number seed to be set before imputing the
data. Ignored if data is already a list of imputed data sets
or an OLDlavaan.mi object.
|
Value
A OLDlavaan.mi object
Author(s)
Terrence D. Jorgensen (University of Amsterdam; TJorgensen314@gmail.com)
References
Enders, C. K. (2010). Applied missing data analysis. New
York, NY: Guilford.
Rubin, D. B. (1987). Multiple imputation for nonresponse in surveys.
New York, NY: Wiley.
See Also
semTools-deprecated()
semTools-deprecated()
semTools-deprecated()
semTools-deprecated()
semTools-deprecated()
Examples
## See the new lavaan.mi package
[Package
semTools version 0.5-7
Index]