The semTools
package has a Missing Data suite, which for years included utilities for fitting structural equation models to multiply imputed data sets with the lavaan
package and automatically pooling the results. These multiple-imputation features continue to grow, justifying their own separate package (and current deprecation in semTools
).
- The
runMI()
function does not exist. ThesemTools::runMI()
function had afun=
argument to specify whichlavaan
function to call (lavaan()
or thecfa()
andsem()
wrappers). Instead, analogous tolavaan
, the basic function will belavaan.mi()
, withcfa.mi()
andsem.mi()
as wrappers aroundlavaan.mi()
. - Unlike
semTools::runMI()
, users may not impute data indirectly viamiPackage=
andmiArgs=
arguments. This feature was originally included to mimic Mplus, which allows for model-based imputation. BecausesemTools::runMI()
did not use the specified SEM as an imputation model, the mimicry of the Mplus functionality was only cosmetic. Even insemTools::runMI()
, it was always better to impute (with full control) using dedicated imputation software first (e.g., theAmelia
ormice
package, or external software like Blimp), to be analyzed withlavaan.mi()
.- The
blavaan
package does indirectly allow for model-based imputation, if users explicitly request posterior samples of missing values. It is planned to eventually capitalize on that feature with a dedicated function in thelavaan.mi
package.
- The
- Because users can pass a vector of multiple (e.g., robust) test statistics to the
lavaan(test=)
argument, there is a newtest=
argument forlavaan::lavTestLRT()
, enabling users to select which specific$\Delta \chi^2$ test should be calculated for a model comparison. Accordingly, thelavTestLRT.mi()
function'stest=
argument has been renamedpool.method=
, so that users can still pass atest=
argument tolavTestLRT.mi(...)
.- The old functions that involved pooling
$\chi^2$ test statistics formerly already had atest=
argument to select"D1"
,"D2"
, or"D3"
. Thelavaan.mi
package has change that argument topool.method=
, as well as implementing the newer"D4"
method for pooling likelihood-ratio statistics (see Neww Features section).
- The old functions that involved pooling
- The newly proposed method for pooling LRT statistics is the new default (
pool.method = "D4"
) forlavTestLRT.mi()
, replacing the old default (butpool.method = "D3"
is still available). The D4 pooling method performs similarly to D3 (see Grund et al.'s simulation study) but is less computationally intensive. - Because users can pass a vector of multiple (e.g., robust) test statistics to the
lavaan(test=)
argument, the user can choose which statistic can be pooled usinglavTestLRT.mi(..., pool.method = "D2", pool.robust = TRUE)
. This is controlled via the newscaled.test=
argument. As an alternative to the standard$\chi^2$ statistic, the user can also pool Browne's (1984) residual-based statistic using, e.g.,lavTestLRT.mi(..., pool.method = "D2", standard.test = "browne.residual.nt")
with the defaultpool.robust=FALSE
. - New functions have been written to provide the same
lavaan
functionality for pooled results:paramterEstimates.mi()
,standardizedSolution.mi()
, andlavResiduals.mi()
. - The
poolSat()
function implements Cai and colleagues' (2012, 2019) method of pooling the saturated-model results, then fitting SEM(s) to those pooled summary statistics. This can be much more computationally efficient than fitting each SEM of interest to each imputation and pooling the results of each estimated SEM. Instead, pooling only occurs for the summary statistics, and each SEM is estimated as it would be for complete data.
- When the
VGAM
package was loaded, it created a conflict with finding theanova()
method forlavaan.mi
objects insemTools
. This was resolved in February 2022 whenVGAM
version 1.1-6 was sent to CRAN.
fitMeasures()
returns an error for multigroup MLSEMs, unless no (S/C)RMR index is requested in thefit.measures=
argument.
Track our progress or report issues on GitHub: