[R-sig-ME] How to extract num. of observations and groups used in a mixed model using gee package
david oseguera montiel
oseguera.david at gmail.com
Tue Apr 24 05:25:41 CEST 2012
David,
Thank you very much. Number of observations solved, but I am still
missing how to find out the number of groups used. In the warpbreaks
data set these are 2. Any ideas. Thank you.
On 23/04/2012 13:28, David Winsemius wrote:
>
> On Apr 23, 2012, at 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"))
>
> Does this address all of those puzzles?
>
> summgee <- summary(gee(breaks ~ tension, id=wool, data=warpbreaks,
> corstr="exchangeable"))
> Beginning Cgee S-function, @(#) geeformula.q 4.13 98/01/27
> running glm to get initial regression estimate
> (Intercept) tensionM tensionH
> 36.38889 -10.00000 -14.72222
> > names(summgee)
> [1] "call" "version" "nobs"
> "residual.summary"
> [5] "model" "title" "coefficients"
> "working.correlation"
> [9] "scale" "error" "iterations"
> > summgee$nobs
> [1] 54
>
> > summgee$call
> gee(formula = breaks ~ tension, id = wool, data = warpbreaks,
> corstr = "exchangeable")
> > summgee$coefficients
> Estimate Naive S.E. Naive z Robust S.E. Robust z
> (Intercept) 36.38889 3.069434 11.855246 5.774705 6.301428
> tensionM -10.00000 3.910008 -2.557539 7.463905 -1.339781
> tensionH -14.72222 3.910008 -3.765266 3.731952 -3.944912
> > rownames(summgee$coefficients)
> [1] "(Intercept)" "tensionM" "tensionH"
>
>>
>> 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
>
> David Winsemius, MD
> West Hartford, CT
>
More information about the R-sig-mixed-models
mailing list