Skip to content
Prev 11581 / 20628 Next

plot observed vs fitted with model with NAs in data

I don't see 'na.action' in your code anywhere.

  This works for me:

mymodel = lmer(hp ~ (1| disp) + (1|cyl), data=mydata,
    na.action=na.exclude)
plot(mymodel, hp ~ fitted(.))

  **However**, the real answer is this item from
https://github.com/lme4/lme4/blob/master/inst/NEWS.Rd, under BUG FIXES
for version 1.1-3:

\item \code{fitted} now respects \code{na.action} settings (Github
      issue #149)

We are hoping to release a new version to CRAN very soon, but in the
meantime version 1.1-4 is available at
http://lme4.r-forge.r-project.org/repos , or from github ...

  Ben Bolker
On 14-03-05 10:40 AM, Paul Tanger wrote: