Mice, RunMI and Sensitivity Analysis problems

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.

Hi,

I have not much experience with this either, but were you aware that the first of these vignettes might be more helpful? They seems to explain more of the basics and let you do simple imputations first. The one you''re referring to here is the last one in the series and seems to pertain to very complex scenarios (while yours looks more simple).

The links are on page 71 of the package's manual.

Grtz,
PJ

Thank you very much for your reply, Pieter-Jan. As I said, I do realise this somewhat specific so I'm glad with any answer that can point me towards even one step closer to a solution. By now, I've managed to resolve the imputation step. I have managed to imputate the dataset with 5 imputations for the 5 different ideological scenarios. The problem I'm left with is the 'sem.mi'-business. Would anyone have a working example of a MGSEM that worked using semTools? Because the example only gives cfa.mi for multigroup, while in LAVAAN sem can also be used for multigroup. This confuses me and makes me think that only a MGCFA can be conducted instead of a MGSEM.

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