How to choose the best converging imputations for my CFA model and pool them

Hey,
I have 70 imputations of my original data set. I want to choose 50 of them which converged after less than 120 iterations on my CFA model:

CFA.model <- ' B1 =~ ZB_TF + SR_TF + KO_TF + AU_TF + SF_TF
B2 =~ ZB_ST + SR_ST + KO_ST + AU_ST + SF_ST + ZB_FW + SR_FW + KO_FW + AU_FW + SF_FW
B3 =~ ZB_FWB + SR_FWB + KO_FWB + AU_FWB + SF_FWB + ZB_RF + SR_RF + KO_RF + AU_RF + SF_RF
B4 =~ ZB_SC + SR_SC + KO_SC + AU_SC + SF_SC + ZB_BT + SR_BT + KO_BT + AU_BT + SF_BT
'

I have found three code variations to select the best 50 imputations but the first and the second don't work for the final fit and pool functions and the third one doesn't work at all, but I suppose I need the third one to go on with a mids object?!

# Select imputed datasets
subset_imp <- miceadds::subset_datlist(imp_long, index=c(2,3,5,6,9,10,12,15,16,17,20,21,23,24,25,27,28,29,30,31,33,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,55,56,57,59,60,61,62,63,64,67,68,69))

# Convert to class imputationList
subset_imp2 <- miceadds::subset_datlist(imp_long, index=c(2,3,5,6,9,10,12,15,16,17,20,21,23,24,25,27,28,29,30,31,33,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,55,56,57,59,60,61,62,63,64,67,68,69), toclass="imputationList")

# Convert to class mids (= multiply imputed data set)
subset_imp3 <- miceadds::subset_datlist(imp_long, index=c(2,3,5,6,9,10,12,15,16,17,20,21,23,24,25,27,28,29,30,31,33,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,55,56,57,59,60,61,62,63,64,67,68,69), toclass = "mids") 

Then, I want to go on roughly like this (following the typical mice workflow (Request: make predictions possible after using pool() · Issue #82 · amices/mice · GitHub), but I am unsure how to implement my CFA here because I always find examples with regression models.

# Fit the CFA model to the selected imputations.
fit <- with(subset_imp, CFA.model)

# Pool the results.
pool.fit <- pool(fit)
summary(pool.fit)

I hope this is somehow understandable. I don't know how to give you any reproducible data with all these imputations...

Thank you!

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.