knitr::opts_chunk$set(
  tidy = TRUE,
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

multgee: GEE Solver for Correlated Nominal or Ordinal Multinomial Responses

Github version R-CMD-check Project Status: Active The project has reached a stable, usable state and is being actively developed.

CRAN Version CRAN Downloads CRAN Downloads

Installation

You can install the release version of multgee:

install.packages("multgee")

The source code for the release version of multgee is available on CRAN at:

Or you can install the development version of multgee:

# install.packages("devtools")
devtools::install_github("AnestisTouloumis/multgee")

The source code for the development version of multgee is available on github at:

To use multgee, you should load the package as follows:

library("multgee")

Usage

This package provides a generalized estimating equations (GEE) solver for fitting marginal regression models with correlated nominal or ordinal multinomial responses based on a local odds ratios parameterization for the association structure [see @Touloumis2013].

There are two core functions to fit GEE models for correlated multinomial responses:

The main arguments in both functions are:

The association structure among the correlated multinomial responses is expressed via marginalized local odds ratios [@Touloumis2013]. The estimating procedure for the local odds ratios can be summarized as follows: For each level pair of the repeated variable, the available responses are aggregated across clusters to form a square marginalized contingency table. Treating these tables as independent, an RC-G(1) type model is fitted in order to estimate the marginalized local odds ratios. The LORstr argument determines the form of the marginalized local odds ratios structure. Since the general RC-G(1) model is closely related to the family of association models, one can instead fit an association model to each of the marginalized contingency tables by setting LORem = "2way" in the core functions.

There are also five useful utility functions:

Example

The following R code replicates the GEE analysis presented in @Touloumis2013.

data("arthritis")
intrinsic.pars(y, arthritis, id, time, rscale = "ordinal")

The intrinsic parameters do not differ much. This suggests that the uniform local odds ratios structure might be a good approximation for the association pattern.

fitord <- ordLORgee(formula = y ~ factor(time) + factor(trt) + factor(baseline),
                    data = arthritis, id = id, repeated = time)
summary(fitord)

The 95\% Wald confidence intervals for the regression parameters are

confint(fitord) 

To illustrate model comparison, consider another model with age and sex as additional covariates:

fitord1 <- update(fitord, formula = . ~ . + age + factor(sex))
waldts(fitord, fitord1)
gee_criteria(fitord, fitord1) 

According to the Wald test, there is no evidence of no difference between the two models. The QICu criterion suggest that fitord should be preferred over fitord1.

Getting help

The statistical methods implemented in multgee are described in @Touloumis2013. A detailed description of the functionality of multgee can be found in @Touloumis2015. Note that an updated version of this paper also serves as a vignette:

browseVignettes("multgee")

How to cite

print(citation("multgee"), bibtex = TRUE)

References



AnestisTouloumis/multgee documentation built on March 19, 2024, 9:55 p.m.