[R] gee models summary
Renaud Lancelot
renaud.lancelot at cirad.fr
Wed Sep 28 18:36:41 CEST 2005
This inconvenience does not occur with function geese in package
geepack. If you're using function gee in package gee, extract the
components you want from the fitted object:
> library(gee)
> library(MASS)
> data(OME)
> fm <- gee(cbind(Correct, Trials-Correct) ~ Loud + Age + OME, id = ID,
+ data = OME, family = binomial, corstr = "exchangeable")
[1] "Beginning Cgee S-function, @(#) geeformula.q 4.13 98/01/27"
[1] "running glm to get initial regression estimate"
[1] -5.90984676 0.15516993 0.01876291 -0.07569691 -0.31660542
> summ.fm <- summary(fm)
> str(summ.fm)
List of 11
$ call : language gee(formula = cbind(Correct, Trials -
Correct) ~ Loud + Age + OME, id = ID, data = OME, family =
binomial, corstr = "exchangeable")
$ version : chr "gee S-function, version 4.13 modified
98/01/27 (1998)"
$ nobs : int 1097
$ residual.summary : Named num [1:5] -0.959 0.551 2.041 3.121 12.024
..- attr(*, "names")= chr [1:5] "Min" "1Q" "Median" "3Q" ...
$ model :List of 3
..$ link : chr "Logit"
..$ varfun: chr "Binomial"
..$ corstr: chr "Exchangeable"
$ title : chr "GEE: GENERALIZED LINEAR MODELS FOR
DEPENDENT DATA"
$ coefficients : num [1:5, 1:5] -5.9010 0.1551 0.0185 -0.0418
-0.2856 ...
..- attr(*, "dimnames")=List of 2
.. ..$ : chr [1:5] "(Intercept)" "Loud" "Age" "OMEhigh" ...
.. ..$ : chr [1:5] "Estimate" "Naive S.E." "Naive z" "Robust S.E." ...
$ working.correlation: num [1:30, 1:30] 1.0000 -0.0234 -0.0234
-0.0234 -0.0234 ...
$ scale : num 1.25
$ error : chr "Error code was 0"
$ iterations : int 4
- attr(*, "class")= chr "summary.gee"
> summ.fm$coefficients
Estimate Naive S.E. Naive z Robust S.E. Robust z
(Intercept) -5.90100336 0.336455218 -17.5387482 0.231463368 -25.4943295
Loud 0.15507565 0.007513314 20.6401142 0.005321880 29.1392592
Age 0.01851319 0.003561640 5.1979385 0.003305525 5.6006793
OMEhigh -0.04183516 0.160288285 -0.2609995 0.152182352 -0.2749015
OMElow -0.28563252 0.131496124 -2.1721745 0.117510247 -2.4307031
or better:
> coef(summ.fm)
Estimate Naive S.E. Naive z Robust S.E. Robust z
(Intercept) -5.90100336 0.336455218 -17.5387482 0.231463368 -25.4943295
Loud 0.15507565 0.007513314 20.6401142 0.005321880 29.1392592
Age 0.01851319 0.003561640 5.1979385 0.003305525 5.6006793
OMEhigh -0.04183516 0.160288285 -0.2609995 0.152182352 -0.2749015
OMElow -0.28563252 0.131496124 -2.1721745 0.117510247 -2.4307031
Best,
Renaud
Dean Sonneborn a écrit :
> I'm running some GEE models but when I request the summary(pcb.gee) all
> I get are rows and rows of intercorelations and they fill up the screen
> buffer so I can not even scroll back to see what else might be in the
> summary. How do I get the summary function to NOT print the
> intercorrelations?
> Thanks,
>
--
Renaud Lancelot
Directeur Adjoint chargé des Affaires Scientifiques
Deputy Director for Scientific Affairs
Département EMVT du CIRAD, TA 30/B
Campus International de Baillarguet
34398 Montpellier Cedex 5 - France
Tel. +33 (0)4 67 59 37 17
Secr. +33 (0)4 67 59 39 04
Fax +33 (0)4 67 59 37 95
More information about the R-help
mailing list