[R-sig-ME] How to extract num. of observations and groups used in a mixed model using gee package

Chuck Cleland ccleland at optonline.net
Mon Apr 23 18:58:02 CEST 2012


On 4/23/2012 12:44 PM, david oseguera montiel wrote:
> Does anyone know how can extract the number of observations and groups used
> in a mixed model with gee package?
> The summary function in gee package does not provide this information.
> e.g.
> data(warpbreaks)
> summary(gee(breaks ~ tension, id=wool, data=warpbreaks,
> corstr="exchangeable"))
>
> I much appreciate any help,
>
> David Oseguera Montiel
> Phd student Wageningen University
>
> pd. I asked this a few days ago in R-help list and I did not get any
> answer yet.
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

library(gee)

data(warpbreaks)

fm1 <- gee(breaks ~ tension, id=wool, data=warpbreaks, 
corstr="exchangeable")

str(fm1)

 > fm1$nobs
[1] 54

 > length(unique(fm1$id))
[1] 2

-- 
Chuck Cleland, Ph.D.
NYU College of Nursing
726 Broadway, 10th floor
New York, NY 10003



More information about the R-sig-mixed-models mailing list