How to access p-values and fit estimates after pooling results from large lavaan.mi object?

52 views Asked by At

tried doing exactly this as shown as well by Hall & Clark (2023):
*All analyses were conducted in R, with the SEMs estimated using the lavaan package (Rosseel, 2012). Missing data were handled with multiple imputation using predictive mean matching in the mice package (van Buuren & Groothuis-Oudshorn, 2011). The semTools package (Jorgenson et al., 2023) was used to pool lavaan results across multiply-imputed datasets.
*
How can I accesss p-values and confidence intervals of the pooled lavaan results?

This is my current code:

# Split the completed imputed datasets into a list, excluding original data 
mice.imp0 <- lapply(1:m, function(i) complete(imp_mids, action = i, include = FALSE))


# Fit SEM model to imputed datasets 
model_pooled <- runMI(sem_model, 
                      data = mice.imp0,
                      fun = "sem",
                      cluster = "SerialAuto",
                      meanstructure = TRUE)

# Summarize the pooled SEM model
summary(model_pooled)
parameterEstimates(model_pooled, standardized = TRUE)

However, my output shows something like in the screenshot I attached. enter image description here

I expected to see p-values and CI as well.

1

There are 1 answers

0
Terrence On

The parameterEstimates() function is not a generic function, so it only works for class?lavaan objects. If you read the class?lavaan.mi help page, you will find available methods for lavaan.mi objects. You just have to use the summary() function, and the output= argument can be used to print the output as a data frame would normally look. There is also a ci= argument.