[Rd] summary(lmList) issues
Ben Bolker
bbolker at gmail.com
Sun Sep 20 20:52:22 CEST 2015
Over on StackOverflow someone is trying to get this code to work:
library("nlme")
fm2Pixel.lis<-lmList(pixel~day+I(day^2)|Dog, Pixel)
summary(fm2Pixel.lis)
(results: Error in `[<-`(`*tmp*`, use, use, ii, value = lst[[ii]]) :
subscript out of bounds)
http://stackoverflow.com/questions/32680306/plotting-individual-confidence-intervals-for-the-coefficients-in-the-lmlist-fit
The problem occurs because one Dog (#9) in the data set only has
data from two days, so the quadratic term is automatically dropped
from the corresponding lm() fit. (See with(Pixel,table(Dog,day)) )
nlme::summary.lmList seems to have some reasonably fancy code that
tries to address this, but I haven't been able to get to the bottom of
the problem yet.
Opinions about submitting this as a bug report (nlme is maintained
by R-core), or other useful input? It seems reasonable to me, but it
could be argued that this is just an edge case, too bad. I don't
really mind getting scolded for submitting what is considered, but I'm
trying to do my due diligence.
Ben Bolker
More information about the R-devel
mailing list