Hi all,
I do not know if any of you might be familiar with my problem since it is kinda specific but here goes as a long shot:
I'm trying to use MICE to conduct Multiple Imputation, since one of my variables (Left-Right scale self-placement, so basically "what is your political ideology") has a missings percentage of around 11%. I think this is due to people that do not want to say they adhere to more extreme ideologies. I wanted to run my model (a MGSEM model, using LAVAAN) on an imputated dataset, and afterwards rerun it as a sensitivity analysis on slightly tweaked imputations, whereby more of the missing respondents (of which we know the other items) are pushed towards either the extreme left or the extreme right.
I followed a vignette from MICE (https://www.gerkovink.com/miceVignettes/Sensitivity_analysis/Sensitivity_analysis.html) to the point I thought it was helpful to me. I entered the following lines of code to imputate my data if possible (V95 is my variable for ideology)
`delta <- c(-2, -0.5, 0, +0.5, +3)
set.seed(12345)
imp.all <- vector("list", length(delta))
post <- ini$post
for (i in 1:length(delta)){
d <- delta[i]
cmd <- paste("imp[[j]][,i] <- imp[[j]][,i] +", d)
post["V95"] <- cmd
imp <- mice(data, post = post, maxit = 5, seed = i, print = FALSE)
imp.all[[i]] <- imp
}`
However, unlike normal MICE commands, it did not show me it was imputating anything. I let it run for half an hour to an hour and interrupted the program in order to try something else. Should I simply have had more patience?
Furthermore, I tried to follow lines 45 and onwards from (https://rdrr.io/cran/semTools/man/runMI.html) which also does not seem to work. It only starts to generate imputations again, and finally does not even give me any fitmeasures for my MG SEM model:
Ideofit.scalar <- sem.mi(model, data = imp.all, estimator = "mlm", group = "Ideology", group.equal = c("loadings","intercepts"))
, nor for a simpler, more general model I tried as a test.
Can anyone maybe shed some more light on any mistakes I have been making in my code? Or wether I went with the wrong strategy? Or wether some of the options I used are no longer compatible with the current version of R? I know I asked a lot of questions, but I'm getting really frustrated because of not being able to wrap my head around these problems.
Thank you so much in advance for your help, I hope someone of you can enlighten at least some aspect of this gordian knot.