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

See Also:


Attachments

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:

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.