2l.pmm and too many random effects #372
james-gwinnutt
started this conversation in
Missing data methodology
Replies: 1 comment
-
I suspect the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Stef,
I am trying to impute longitudinal missing data using the 2 level procedures in mice. One of the variables only takes certain values, but there are many of these values and so doesn't make sense to treat it as a discrete outcome. I wanted to use 2l.pmm to impute this variable. When I try this I get the error:
Error: number of observations (=4153) <= number of random effects (=17094) for term (1 + v1+ v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10| id); the random-effects parameters and the residual variance (or scale parameter) are probably unidentifiable
I guess this is because it is trying to calculate random intercepts and slopes for each individual and there are not enough observations (max obs = 3, min = 2 per person). If I go to the prediction matrix and switch the values from 2 to 1 (i.e. removing the random slope) the imputation works. I was wondering whether there is any point to doing this, or whether I should give up on trying to impute in a multi-level manner given that there are not many observations per person? It seems to me that the other variables that can be imputed with 2l.norm will benefit from the 2 level structure, and only the variable that I am trying to use 2l.pmm will loose this advantage (but the imputed values will be possible values).
I hope this makes sense. Please let me know if I can clarify anything. Thanks a lot for your time reviewing this query.
James
Beta Was this translation helpful? Give feedback.
All reactions