| lavaan.mi-class | R Documentation |
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.
## 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"),
...
)
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 |
See |
coef |
|
vcov |
|
fitted.values |
|
fitted |
alias for |
nobs |
|
fitMeasures |
|
fitmeasures |
alias for |
show |
|
summary |
|
coefListlist of estimated coefficients in matrix format (one
per imputation) as output by lavInspect(fit, "est")
phiListlist of model-implied latent-variable covariance
matrices (one per imputation) as output by
lavInspect(fit, "cov.lv")
miListlist of modification indices output by
lavaan::modindices()
lavListCallcall to lavaan::lavaanList() used to fit the
model to the list of imputed data sets in @DataList, stored as a
list of arguments
convergencelist of logical 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.
versionNamed character vector indicating the lavaan and
lavaan.mi version numbers.
DataListThe list of imputed data sets
SampleStatsListList of output from
lavInspect(fit, "sampstat") applied to each fitted model.
ParTableList,vcovList,testList,baselineListSee lavaan::lavaanList
h1ListSee lavaan::lavaanList. An additional element is
added to the list: $PT is the "saturated" model's parameter
table, returned by lavaan::lav_partable_unrestricted().
call,Options,ParTable,pta,Data,Model,meta,timingList,CacheList,optimList,impliedList,loglikList,internalList,funList,externalBy default, lavaan.mi() does not populate the remaining @*List slots
from the lavaan::lavaanList class. But they can be added to the call using
the store.slots= argument (passed to lavaan::lavaanList() via ...).
See the lavaan.mi() function
for details. Wrapper functions include cfa.mi(),
sem.mi(), and growth.mi().
Terrence D. Jorgensen (University of Amsterdam; TJorgensen314@gmail.com)
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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/9780470316696")}
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.