Bug 16542 - nlme:::summary.lmList with unequal outputs per group
Summary: nlme:::summary.lmList with unequal outputs per group
Alias: None
Product: R
Classification: Unclassified
Component: Analyses (show other bugs)
Version: R-devel (trunk)
Hardware: Other All
: P3 minor
Assignee: R-core
Depends on:
Reported: 2015-09-22 14:35 UTC by Ben Bolker
Modified: 2015-10-05 09:29 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Ben Bolker 2015-09-22 14:35:42 UTC
nlme::summary.lmList can fail when some of the groups are too small for the model being fitted and hence give different-size output vcov matrices.

  Over on StackOverflow someone is trying to get this code to work:

fm2Pixel.lis<-lmList(pixel~day+I(day^2)|Dog, Pixel)

(results: Error in `[<-`(`*tmp*`, use, use, ii, value = lst[[ii]]) :
 subscript out of bounds)


   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.