Skip to content
Prev 14415 / 20628 Next

na.action in lmer()

Ok, I get it.  
Yes, I did mean REML=FALSE.  I use that option so that I can do an anova() on the two nested models.

Thank you,
Ravi

-----Original Message-----
From: Ben Bolker [mailto:bbolker at gmail.com] 
Sent: Thursday, April 21, 2016 5:31 PM
To: Ravi Varadhan <ravi.varadhan at jhu.edu>; r-sig-mixed-models at r-project.org
Subject: Re: [R-sig-ME] na.action in lmer()


  You shouldn't need to do anything special, since the data are written out in a long format, e.g.

Patient  time   y
1           0   0.1
1           1   0.3
...
2           0   0.1
2           1   NA
2           2   0.3
...

  Unlike in the classic MANOVA setup where the responses from an individual are all considered part of the same observation (and hence an NA screws things up badly), this is just handled automatically/naturally in the mixed-model context.

  The only difference between na.omit() and na.exclude() is whether NA values are inserted into appropriate places in the downstream residual/prediction calculations.  (g)lmer can't do anything with observations containing NA values, but 'observation' means (in this
case) 'patient-time combination', not 'patient'.

  (Do you mean REML=FALSE ... ?)
On 16-04-21 05:19 PM, Ravi Varadhan wrote: