Comparison of nested Generalized Estimating Equations
Allows to compare nested generalized estimating equations using the Wald and generalized score tests.
## S3 method for class 'glmgee' anova(object, ..., test = c("wald", "score"), verbose = TRUE)
object |
an (object) of the class glmgee which is obtained from the fit of a generalized estimating equation. |
... |
another objects of the class glmgee which are obtained from the fit of generalized estimating equations. |
test |
an (optional) character string indicating the required test. The available options are: Wald ("wald") and generalized score ("score") tests. By default, |
verbose |
an (optional) logical switch indicating if should the report of results be printed. By default, |
A matrix with three columns which contains the following:
Chi:
The value of the statistic of the test.
Df:
The number of degrees of freedom.
Pr(>Chi):
The p-value of the test computed using the Chi-square distribution.
Boos D. (1992) On Generalized Score Tests. American Statistician 46, 327–33.
Rotnitzky A. and Jewell N.P. (1990). Hypothesis Testing of Regression Parameters in Semiparametric Generalized Linear Models for Cluster Correlated Data. Biometrika 77, 485-497.
## Example 1 mod <- size ~ poly(days,4) fit1 <- glmgee(mod, id=tree, family=Gamma("log"), data=spruce, corstr="AR-1") fit2 <- update(fit1, . ~ . + treat) fit3 <- update(fit2, . ~ . + poly(days,4):treat) anova(fit1,fit2,fit3,test="wald") anova(fit3,test="wald") anova(fit1,fit2,fit3,test="score") anova(fit3,test="score") ## Example 2 mod2 <- depressd ~ group fit1 <- glmgee(mod2, id=subj, family=binomial("logit"), corstr="Exchangeable", data=depression) fit2 <- update(fit1, . ~ . + visit) fit3 <- update(fit2, . ~ . + group:visit) anova(fit1,fit2,fit3,test="wald") anova(fit3,test="wald") anova(fit1,fit2,fit3,test="score") anova(fit3,test="score") ## Example 3 mod3 <- dep ~ group fit1 <- glmgee(mod3, id=subj, family=gaussian("identity"), corstr="AR-1", data=depression) fit2 <- update(fit1, . ~ . + visit) fit3 <- update(fit2, . ~ . + group:visit) anova(fit1,fit2,fit3,test="wald") anova(fit3,test="wald") anova(fit1,fit2,fit3,test="score") anova(fit3,test="score")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.