anova.glmgee: Comparison of nested Generalized Estimating Equations

View source: R/geeglm.R

anova.glmgeeR Documentation

Comparison of nested Generalized Estimating Equations

Description

Allows to compare nested generalized estimating equations using the Wald and generalized score tests.

Usage

## S3 method for class 'glmgee'
anova(
  object,
  ...,
  test = c("wald", "score"),
  verbose = TRUE,
  varest = c("robust", "df-adjusted", "model", "bias-corrected")
)

Arguments

object

an object of the class glmgee.

...

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. As default, test is set to "wald".

verbose

an (optional) logical switch indicating if should the report of results be printed. As default, verbose is set to TRUE.

varest

an (optional) character string indicating the type of estimator which should be used to the variance-covariance matrix of the interest parameters in the Wald test. The available options are: robust sandwich-type estimator ("robust"), degrees-of-freedom-adjusted estimator ("df-adjusted"), bias-corrected estimator ("bias-corrected"), and the model-based or naive estimator ("model"). As default, varest is set to "robust". See vcov.glmgee.

Value

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.

References

Rotnitzky A., Jewell P. (1990) Hypothesis Testing of Regression Parameters in Semiparametric Generalized Linear Models for Cluster Correlated Data. Biometrika 77:485-497.

Boos D.D. (1992) On Generalized Score Tests. The American Statistician 46:327-333.

Vanegas L.H., Rondon L.M., Paula G.A. (2023) Generalized Estimating Equations using the new R package glmtoolbox. The R Journal 15:105-133.

Boos D. (1992) On Generalized Score Tests. American Statistician 46:327–33.

Rotnitzky A., Jewell N.P. (1990). Hypothesis Testing of Regression Parameters in Semiparametric Generalized Linear Models for Cluster Correlated Data. Biometrika 77:485-497.

Examples

###### Example 1: Effect of ozone-enriched atmosphere on growth of sitka spruces
data(spruces)
mod <- size ~ poly(days,4)
fit1 <- glmgee(mod, id=tree, family=Gamma(log), data=spruces, corstr="AR-M-dependent")
fit2 <- update(fit1, . ~ . + treat)
fit3 <- update(fit2, . ~ . + poly(days,4):treat)
anova(fit1,fit2,fit3,test="wald")
anova(fit3,test="wald")

###### Example 2: Treatment for severe postnatal depression
data(depression)
mod2 <- depressd ~ group
fit1 <- glmgee(mod2, id=subj, family=binomial(logit), corstr="AR-M-dependent", data=depression)
fit2 <- update(fit1, . ~ . + visit)
fit3 <- update(fit2, . ~ . + group:visit)
anova(fit1,fit2,fit3,test="score")
anova(fit3,test="score")


glmtoolbox documentation built on May 29, 2024, 2:51 a.m.