Learn R Programming

semTools (version 0.5-1)

lavaan.mi-class: Class for a lavaan Model Fitted to Multiple Imputations

Description

This class extends the '>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 lavaan.mi
show(object)

# S4 method for lavaan.mi summary(object, se = TRUE, ci = FALSE, level = 0.95, standardized = FALSE, rsquare = FALSE, fmi = FALSE, header = TRUE, scale.W = TRUE, asymptotic = FALSE, add.attributes = TRUE)

# S4 method for lavaan.mi nobs(object, total = TRUE)

# S4 method for lavaan.mi coef(object, type = "free", labels = TRUE)

# S4 method for lavaan.mi vcov(object, type = c("pooled", "between", "within", "ariv"), scale.W = TRUE)

# S4 method for lavaan.mi anova(object, ...)

# S4 method for lavaan.mi fitMeasures(object, fit.measures = "all", baseline.model = NULL)

# S4 method for lavaan.mi fitmeasures(object, fit.measures = "all", baseline.model = NULL)

# S4 method for lavaan.mi fitted(object)

# S4 method for lavaan.mi fitted.values(object)

# S4 method for lavaan.mi residuals(object, type = c("raw", "cor"))

# S4 method for lavaan.mi resid(object, type = c("raw", "cor"))

Arguments

object

An object of class lavaan.mi

se, ci, level, standardized, rsquare, header, add.attributes
fmi

logical indicating whether to include the Fraction Missing Information (FMI) for parameter estimates in the summary output (see Value section).

scale.W

logical. If TRUE (default), the vcov method will calculate the pooled covariance matrix by scaling the within-imputation component by the ARIV (see Enders, 2010, p. 235, for definition and formula). Otherwise, the pooled matrix is calculated as the weighted sum of the within-imputation and between-imputation components (see Enders, 2010, ch. 8, for details). This in turn affects how the summary method calcualtes its pooled standard errors, as well as the Wald test (lavTestWald.mi).

asymptotic

logical. If FALSE (typically a default, but see Value section for details using various methods), pooled tests (of fit or pooled estimates) will be F or t statistics with associated degrees of freedom (df). If TRUE, the (denominator) df are assumed to be sufficiently large for a t statistic to follow a normal distribution, so it is printed as a z statisic; likewise, F times its numerator df is printed, assumed to follow a \(\chi^2\) distribution.

total

logical (default: TRUE) indicating whether the nobs method should return the total sample size or (if FALSE) a vector of group sample sizes.

type

The meaning of this argument varies depending on which method it it used for. Find detailed descriptions in the Value section under coef, vcov, and residuals.

labels

logical indicating whether the coef output should include parameter labels. Default is TRUE.

...

Additional arguments passed to lavTestLRT.mi, or subsequently to lavTestLRT.

fit.measures, baseline.model

Value

coef

signature(object = "lavaan.mi", type = "free", labels = TRUE): See '>lavaan. Returns the pooled point estimates (i.e., averaged across imputed data sets; see Rubin, 1987).

vcov

signature(object = "lavaan.mi", scale.W = TRUE, type = c("pooled","between","within","ariv")): By default, returns the pooled covariance matrix of parameter estimates (type = "pooled"), the within-imputations covariance matrix (type = "within"), the between-imputations covariance matrix (type = "between"), or the average relative increase in variance (type = "ariv") due to missing data.

fitted.values

signature(object = "lavaan.mi"): See '>lavaan. Returns model-implied moments, evaluated at the pooled point estimates.

fitted

signature(object = "lavaan.mi"): alias for fitted.values

residuals

signature(object = "lavaan.mi", type = c("raw","cor")): See '>lavaan. By default (type = "raw"), returns the difference between the model-implied moments from fitted.values and the pooled observed moments (i.e., averaged across imputed data sets). Standardized residuals are also available, using Bollen's (type = "cor" or "cor.bollen") or Bentler's (type = "cor.bentler") formulas.

resid

signature(object = "lavaan.mi", type = c("raw","cor")): alias for residuals

nobs

signature(object = "lavaan.mi", total = TRUE): either the total (default) sample size or a vector of group sample sizes (total = FALSE).

anova

signature(object = "lavaan.mi", ...): Returns a test of model fit for a single model (object) or test(s) of the difference(s) in fit between nested models passed via .... See lavTestLRT.mi and compareFit for details.

fitMeasures

signature(object = "lavaan.mi", fit.measures = "all", baseline.model = NULL): See lavaan's fitMeasures for details. Pass additional arguments to lavTestLRT.mi via ....

fitmeasures

alias for fitMeasures.

show

signature(object = "lavaan.mi"): returns a message about convergence rates and estimation problems (if applicable) across imputed data sets.

summary

signature(object = "lavaan.mi", se = TRUE, ci = FALSE, level = .95, standardized = FALSE, rsquare = FALSE, fmi = FALSE, scale.W = FALSE, asymptotic = FALSE, add.attributes = TRUE): see parameterEstimates for details. By default, summary returns pooled point and SE estimates, along with t test statistics and their associated df and p values. If ci = TRUE, confidence intervales are returned with the specified confidence level (default 95% CI). If asymptotic = TRUE, z instead of t tests are returned. standardized solution(s) can also be requested by name ("std.lv" or "std.all") or both are returned with TRUE. R-squared for endogenous variables can be requested, as well as the Fraction Missing Information (FMI) for parameter estimates. By default, the output will appear like lavaan's summary output, but if add.attributes = FALSE, the returned data.frame will resemble the parameterEstimates output. The scale.W argument is passed to vcov (see description above).

Slots

coefList

list of estimated coefficients in matrix format (one per imputation) as output by lavInspect(fit, "est")

GLIST

pooled list of coefficients in GLIST format

miList

list of modification indices output by modindices

seed

integer seed set before running imputations

lavListCall

call to lavaanList used to fit the model to the list of imputed data sets in @DataList, stored as a list of arguments

imputeCall

call to imputation function (if used), stored as a list of arguments

convergence

list 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.

lavaanList_slots

All remaining slots are from '>lavaanList, but runMI only populates a subset of the list slots, two of them with custom information:

DataList

The list of imputed data sets

SampleStatsList

List of output from lavInspect(fit, "sampstat") applied to each fitted model

ParTableList

See '>lavaanList

vcovList

See '>lavaanList

testList

See '>lavaanList

Objects from the Class

See the runMI function for details. Wrapper functions include lavaan.mi, cfa.mi, sem.mi, and growth.mi.

References

Asparouhov, T., & Muthen, B. (2010). Chi-square statistics with multiple imputation. Technical Report. Retrieved from www.statmodel.com

Enders, C. K. (2010). Applied missing data analysis. New York, NY: Guilford.

Li, K.-H., Meng, X.-L., Raghunathan, T. E., & Rubin, D. B. (1991). Significance levels from repeated p-values with multiply-imputed data. Statistica Sinica, 1(1), 65--92. Retrieved from https://www.jstor.org/stable/24303994

Meng, X.-L., & Rubin, D. B. (1992). Performing likelihood ratio tests with multiply-imputed data sets. Biometrika, 79(1), 103--111. Retrieved from https://www.jstor.org/stable/2337151

Rubin, D. B. (1987). Multiple imputation for nonresponse in surveys. New York, NY: Wiley.

Examples

Run this code
# NOT RUN {
## See ?runMI help page

# }

Run the code above in your browser using DataLab