I am using multiple imputation to handle missingness in my dataset of 83 variables across 250 participants. I intend to use 12 of these variables, which comprise a self-compassion questionnaire, in a series of CFA models.
Multiple imputation was conducted with mice
and I am using lavaan
and lavaan.mi
for the factor analysis.
imp2 <- mice(merged_data, m = 5, maxit = 10,
predictorMatrix = predM,
method = meth, seed = 12345)
# lavaan model
cfa1 <- ' scs =~ NA*SCS_1 + SCS_2 + SCS_3 + SCS_4 + SCS_5 +
SCS_6 + SCS_7 + SCS_8 + SCS_9 + SCS_10 + SCS_11 + SCS_12
scs ~~ 1*scs'
library(lavaan.mi)
cfa1out <- cfa.mi(cfa1, data=imp2, ordered=c("SCS_1", "SCS_2", "SCS_3", "SCS_4", "SCS_5", "SCS_6",
"SCS_7", "SCS_8", "SCS_9", "SCS_10", "SCS_11", "SCS_12"),
estimator = "WLSMV")
summary(cfa1out)
semTools::fitMeasures(cfa1out, fit.measures = c("all"),
test = "D2", pool.robust = TRUE, asymptotic = TRUE)
All of this seems to run fine. The problem is that half of the indicator variables I am entering into the lavaan CFA model need to be reverse scored. How can I reverse score a select group of variables that were treated with multiple imputation across 5 datasets? Additionally, how can I sum these and other variables to derive total or subscale scores, since I imputed at the item level?
Thanks in advance for your assistance.