[R-sig-ME] Imputation methods mixed model analysis

Thierry Onkelinx th|erry@onke||nx @end|ng |rom |nbo@be
Thu Apr 16 15:40:56 CEST 2020

Dear Sam,

Don't use the data.frame$ notation in your formula. Just use the code below.

preCORT_ICC <- lmer(Cortisol_pre ~ 1 + (1 | ID), data = Data_F_long)

Which values are missing: Cortisol_pre or ID?

Best regards,

ir. Thierry Onkelinx
Statisticus / Statistician

Vlaamse Overheid / Government of Flanders
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
thierry.onkelinx using inbo.be
Havenlaan 88 bus 73, 1000 Brussel

To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey


Op do 16 apr. 2020 om 15:34 schreef Breugelmans, S. (Sara) <
S.Breugelmans using student.ru.nl>:

> Dear colleagues,
> 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!
> Kind regards
> Sam
>         [[alternative HTML version deleted]]
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

	[[alternative HTML version deleted]]

More information about the R-sig-mixed-models mailing list