Dear list,
I have a question about imputing 2 level data in MICE, could you give me some
suggestions please? Thank you very much.
The data set contains 35634 cases and 1007 variables, 280 of them are
categorical variables, and the rest of them are continuous variables. On the
second level, there are 198 units. I am trying to impute missing values for 270
categorical variables by using the principle components of all the continuous
variables. In the JSS paper about MICE:
"It requires the specification of the fixed effects, the random effects and
the class variable. Furthermore, it assumes that the predictors contain a column
of ones representing the intercept. Random effects are coded in the predictor
matrix as a `2'. The class variable (only one is allowed) is coded by a
`-2'."
and
"R> pred["popular", ] <- c(0, -2, 0, 2, 1, 2, 0)
R> imp <- mice(popmis, meth = c("", "",
"2l.norm", "", "",
+ "", ""), pred = pred, maxit = 1, seed = 71152)"
My questions are:
1. In the above example, only 1 variable have missing values, so in the code,
only one "2l.norm" was specified. In my case, I have 270 categorical
variables to be imputed, how do I do this?
2. how to designate the fixed effects, random effects and class variable in the
above code with 2 and -2?
3. Should I add a column myself into the data set with 1 for all values for the
intercept term? I already have the unit ID variables in the data set, should I
change all the values of it to -2? and what does 0 and 1 in "R>
pred["popular", ] <- c(0, -2, 0, 2, 1, 2, 0) " mean?
4. Is there any example similar to my situation please? The example in the paper
is a quite simple case. Thank you very much.
ya
[[alternative HTML version deleted]]