[R-sig-ME] Imputation methods mixed model analysis
Breugelmans, S. (Sara)
S@Breuge|m@n@ @end|ng |rom @tudent@ru@n|
Thu Apr 16 15:33:54 CEST 2020
For my thesis I am conducting a mixed model analysis on longitudinal data. However, when I tried to run an intercept-only model I got the following error:
preCORT_ICC <- lmer(Data_F_long$Cortisol_pre ~ 1 + (1 | Data_F_long$ID), data = Data_F_long)
Error in KhatriRao(sm, t(mm)) : (p <- ncol(X)) == ncol(Y) is not TRUE
When I searched this error I saw that it might have to do something with the number of NA's. So then I thought it would be better to use some kind of imputation strategy.
I was wondering if there is a build-in function in lmer() to do this. Or is it better to manually impute the data before analysing.
I already found a function called mice(). Does anyone of you have experience with mice() and would you recommend using it?
Of course it would be more convenient if I could use some kind of build-in function in lmer().
Thank you for your response!
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models