[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 16:52:19 CEST 2012
David,
I much appreciate your help, thank you so much.
On 24/04/2012 09:15, David Winsemius wrote:
>
> On Apr 24, 2012, at 12:43 AM, david oseguera montiel wrote:
>
>> I meant the grouping
>
>> factor in the model indicated by id. From gee documentation 'id = a
>> vector which identifies the clusters..'. So in the warpbreaks data
>> set, id = wool has 54 obs, in two clusters (groups).
>> library(gee)
>> library(Hmisc)
>> > describe(warpbreaks$wool)
>> warpbreaks$wool
>> n missing unique
>> 54 0 2
>>
>> A (27, 50%), B (27, 50%)
>
> So you would use this information to direct your search:
>
> summgee <- summary(gee(breaks ~ tension, id=wool, data=warpbreaks,
> corstr="exchangeable"))
>
> summgee$call$id
> # wool
> length(levels(warpbreaks[[as.character(summgee$call$id)]]))
> #[1] 2
>
>>
>>
>>
>> On 23/04/2012 22:57, David Winsemius wrote:
>>>
>>> On Apr 23, 2012, at 11:25 PM, david oseguera montiel wrote:
>>>
>>>> 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.
>>>>
>>> I must be unclear what you mean by "number of groups".
>>
>
> David Winsemius, MD
> West Hartford, CT
>
More information about the R-sig-mixed-models
mailing list