lavaan.mi-class {lavaan.mi} | R Documentation |
Class for a lavaan Model Fitted to Multiple Imputations
Description
This class extends the lavaan::lavaanList class, created by fitting a lavaan model to a list of data sets. In this case, the list of data sets are multiple imputations of missing data.
Usage
## S4 method for signature 'lavaan.mi'
show(object)
## S4 method for signature 'lavaan.mi'
summary(
object,
header = TRUE,
fit.measures = FALSE,
fm.args = list(standard.test = "default", scaled.test = "default", rmsea.ci.level =
0.9, rmsea.h0.closefit = 0.05, rmsea.h0.notclosefit = 0.08, robust = TRUE,
cat.check.pd = TRUE),
estimates = TRUE,
ci = FALSE,
standardized = FALSE,
std = standardized,
cov.std = TRUE,
rsquare = FALSE,
fmi = FALSE,
asymptotic = FALSE,
scale.W = !asymptotic,
omit.imps = c("no.conv", "no.se"),
remove.unused = TRUE,
modindices = FALSE,
nd = 3L,
...
)
## S4 method for signature 'lavaan.mi'
nobs(object, total = TRUE)
## S4 method for signature 'lavaan.mi'
coef(object, type = "free", labels = TRUE, omit.imps = c("no.conv", "no.se"))
## S4 method for signature 'lavaan.mi'
vcov(
object,
type = c("pooled", "between", "within", "ariv"),
scale.W = TRUE,
omit.imps = c("no.conv", "no.se")
)
## S4 method for signature 'lavaan.mi'
fitted(object, omit.imps = c("no.conv", "no.se"))
## S4 method for signature 'lavaan.mi'
fitted.values(object, omit.imps = c("no.conv", "no.se"))
## S4 method for signature 'lavaan.mi'
fitMeasures(
object,
fit.measures = "all",
baseline.model = NULL,
h1.model = NULL,
fm.args = list(standard.test = "default", scaled.test = "default", rmsea.ci.level =
0.9, rmsea.h0.closefit = 0.05, rmsea.h0.notclosefit = 0.08, robust = 0.08,
cat.check.pd = TRUE),
output = "vector",
omit.imps = c("no.conv", "no.se"),
...
)
## S4 method for signature 'lavaan.mi'
fitmeasures(
object,
fit.measures = "all",
baseline.model = NULL,
h1.model = NULL,
fm.args = list(standard.test = "default", scaled.test = "default", rmsea.ci.level =
0.9, rmsea.h0.closefit = 0.05, rmsea.h0.notclosefit = 0.08, robust = 0.08,
cat.check.pd = TRUE),
output = "vector",
omit.imps = c("no.conv", "no.se"),
...
)
Arguments
object |
An object of class lavaan.mi |
header , fit.measures , fm.args , estimates , ci , standardized , std , cov.std , rsquare , remove.unused , modindices , nd , output |
See descriptions of |
fmi |
|
asymptotic |
|
scale.W |
|
omit.imps |
|
... |
Additional arguments passed to |
total |
|
type |
The meaning of this argument varies depending on which method it
it used for. Find detailed descriptions in the Value section
under |
labels |
|
baseline.model , h1.model |
Value
coef |
|
vcov |
|
fitted.values |
|
fitted |
alias for |
nobs |
|
fitMeasures |
|
fitmeasures |
alias for |
show |
|
summary |
|
Slots
coefList
list
of estimated coefficients in matrix format (one per imputation) as output bylavInspect(fit, "est")
phiList
list
of model-implied latent-variable covariance matrices (one per imputation) as output bylavInspect(fit, "cov.lv")
miList
list
of modification indices output bylavaan::modindices()
lavListCall
call to
lavaan::lavaanList()
used to fit the model to the list of imputed data sets in@DataList
, stored as alist
of argumentsconvergence
list
oflogical
vectors indicating whether, for each imputed data set, (1) the model converged on a solution, (2) SEs could be calculated, (3) the (residual) covariance matrix of latent variables (\Psi
) is non-positive-definite, and (4) the residual covariance matrix of observed variables (\Theta
) is non-positive-definite.version
Named
character
vector indicating thelavaan
andlavaan.mi
version numbers.DataList
The
list
of imputed data setsSampleStatsList
List of output from
lavInspect(fit, "sampstat")
applied to each fitted model.ParTableList,vcovList,testList,baselineList
h1List
See lavaan::lavaanList. An additional element is added to the
list
:$PT
is the "saturated" model's parameter table, returned bylavaan::lav_partable_unrestricted()
.call,Options,ParTable,pta,Data,Model,meta,timingList,CacheList,optimList,impliedList,loglikList,internalList,funList,external
By default,
lavaan.mi()
does not populate the remaining@*List
slots from the lavaan::lavaanList class. But they can be added to the call using thestore.slots=
argument (passed tolavaan::lavaanList()
via ...).
Objects from the Class
See the lavaan.mi()
function
for details. Wrapper functions include cfa.mi()
,
sem.mi()
, and growth.mi()
.
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. doi:10.1002/9780470316696
Examples
data(HS20imps) # import a list of 20 imputed data sets
## specify CFA model from lavaan's ?cfa help page
HS.model <- '
visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9
'
## fit model to imputed data sets
fit <- cfa.mi(HS.model, data = HS20imps)
## vector of pooled coefficients
coef(fit)
## their pooled asymptotic covariance matrix
vcov(fit)
## which is the weighted sum of within- and between-imputation components
vcov(fit, type = "within")
vcov(fit, type = "between")
## covariance matrix of observed variables,
## as implied by pooled estimates
fitted(fit)
## custom null model for CFI
HS.parallel <- '
visual =~ x1 + 1*x2 + 1*x3
textual =~ x4 + 1*x5 + 1*x6
speed =~ x7 + 1*x8 + 1*x9
'
fit0 <- cfa.mi(HS.parallel, data = HS20imps, orthogonal = TRUE)
fitMeasures(fit, baseline.model = fit0, fit.measures = "default",
output = "text")
## See ?lavaan.mi help page for more examples