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

lavaan.mi-classR Documentation

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 signature 'lavaan.mi'
show(object)

## S4 method for signature 'lavaan.mi'
summary(object, se = TRUE, ci = FALSE,
  level = 0.95, standardized = FALSE, rsquare = FALSE, fmi = FALSE,
  scale.W = !asymptotic, omit.imps = c("no.conv", "no.se"),
  asymptotic = FALSE, header = TRUE, output = "text",
  fit.measures = FALSE, ...)

## 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'
anova(object, ...)

## S4 method for signature 'lavaan.mi'
fitMeasures(object, fit.measures = "all",
  baseline.model = NULL, output = "vector", omit.imps = c("no.conv",
  "no.se"), ...)

## S4 method for signature 'lavaan.mi'
fitmeasures(object, fit.measures = "all",
  baseline.model = NULL, output = "vector", 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'
residuals(object, type = c("raw", "cor"), omit.imps = c("no.conv", "no.se"))

## S4 method for signature 'lavaan.mi'
resid(object, type = c("raw", "cor"), omit.imps = c("no.conv", "no.se"))

Arguments

object

An object of class lavaan.mi

se, ci, level, standardized, rsquare, header, output

See parameterEstimates. output can also be passed to fitMeasures.

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

omit.imps

character vector specifying criteria for omitting imputations from pooled results. Can include any of c("no.conv", "no.se", "no.npd"), the first 2 of which are the default setting, which excludes any imputations that did not converge or for which standard errors could not be computed. The last option ("no.npd") would exclude any imputations which yielded a nonpositive definite covariance matrix for observed or latent variables, which would include any "improper solutions" such as Heywood cases. NPD solutions are not excluded by default because they are likely to occur due to sampling error, especially in small samples. However, gross model misspecification could also cause NPD solutions, users can compare pooled results with and without this setting as a sensitivity analysis to see whether some imputations warrant further investigation. Specific imputation numbers can also be included in this argument, in case users want to apply their own custom omission criteria (or simulations can use different numbers of imputations without redundantly refitting the model).

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 χ^2 distribution.

fit.measures, baseline.model

See fitMeasures. summary(object, fit.measures = TRUE) will print (but not return) a table of fit measures to the console.

...

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

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.

Value

coef

signature(object = "lavaan.mi", type = "free", labels = TRUE, omit.imps = c("no.conv","no.se")): 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, omit.imps = c("no.conv","no.se"), 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", omit.imps = c("no.conv","no.se")): See lavaan. Returns model-implied moments, evaluated at the pooled point estimates.

fitted

alias for fitted.values

residuals

signature(object = "lavaan.mi", type = c("raw","cor"), omit.imps = c("no.conv","no.se")): 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

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, output = "vector", omit.imps = c("no.conv","no.se"), ...): 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 = !asymptotic, omit.imps = c("no.conv","no.se"), asymptotic = FALSE, header = TRUE, output = "text", fit.measures = FALSE, ...): 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 output == "data.frame", the returned data.frame will resemble the parameterEstimates output. The scale.W argument is passed to vcov (see description above). Setting fit.measures=TRUE will additionally print fit measures to the console, but they will not be returned; additional arguments may be passed via ... to fitMeasures and subsequently to lavTestLRT.mi.

Slots

coefList

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

phiList

list of model-implied latent-variable covariance matrices (one per imputation) as output by lavInspect(fit, "cov.lv")

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 (Ψ) is non-positive-definite, and (4) the residual covariance matrix of observed variables (Θ) 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

h1List

See lavaanList. An additional element is added to the list: $PT is the "saturated" model's parameter table, returned by lav_partable_unrestricted.

baselineList

See lavaanList

Objects from the Class

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

Author(s)

Terrence D. Jorgensen (University of Amsterdam; TJorgensen314@gmail.com)

References

Asparouhov, T., & Muthen, B. (2010). Chi-square statistics with multiple imputation. Technical Report. Retrieved from http://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. doi: 10.2307/2337151

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

Examples


## See ?runMI help page


semTools documentation built on May 10, 2022, 9:05 a.m.