The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

R-CMD-check Codecov test coverage

Overview

geer fits marginal models for independent, repeated, or clustered responses using Generalized Estimating Equations (GEE). Supported estimation methods include the traditional GEE, bias-reducing GEE, bias-corrected GEE, and Jeffreys-prior penalized GEE. Continuous, binary, and count responses are handled by geewa, while binary responses can also be handled by geewa_binary through an odds-ratio parameterization.

Installation

You can install the development version of geer from GitHub:

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

Usage

Load the package:

library("geer")

Quick example

Fit a bias-reducing GEE with an exchangeable working correlation to the epilepsy seizure count data:

data("epilepsy", package = "geer")

fit <- geewa(
  formula = seizures ~ treatment + lnbaseline + lnage,
  family = poisson(link = "log"),
  data = epilepsy,
  id = id,
  corstr = "exchangeable",
  method = "brgee-robust"
)
summary(fit, cov_type = "bias-corrected")

For binary responses, use geewa_binary() with an odds-ratio parameterization:

data("cerebrovascular", package = "geer")

fit_bin <- geewa_binary(
  formula = ecg ~ treatment + factor(period),
  link = "logit",
  data = cerebrovascular,
  id = id,
  orstr = "exchangeable",
  method = "brgee-robust"
)
summary(fit_bin, cov_type = "bias-corrected")

Fitting models

There are two core fitting functions:

Both functions support the following estimation methods via the method argument:

Method Description
"gee" Traditional GEE
"brgee-robust", "brgee-naive", "brgee-empirical" Bias-reducing GEE (differing in the bias adjustment used: robust, model-based, or empirical)
"bcgee-robust", "bcgee-naive", "bcgee-empirical" Bias-corrected GEE (one-step correction; same three variants)
"pgee-jeffreys" Fully iterated Jeffreys-prior penalized GEE
"opgee-jeffreys" One-step penalized GEE
"hpgee-jeffreys" Hybrid one-step GEE

The working correlation structure for geewa() is controlled by corstr: "independence", "exchangeable", "ar1", "m-dependent", "unstructured", "toeplitz", and "fixed". The working odds-ratio structure for geewa_binary() is controlled by orstr: "independence", "exchangeable", "unstructured", and "fixed".

Convergence and fitting options are set via geer_control().

Inference

Standard S3 methods are available for fitted geer objects:

The cov_type argument controls the covariance estimator used for inference: "bias-corrected" (default), "robust" (sandwich), "df-adjusted", or "naive" (model-based).

Model building and selection

emmeans support

Fitted geer objects are compatible with the emmeans package for estimated marginal means.

Datasets

The package includes seven example datasets: cerebrovascular, cholecystectomy, depression, epilepsy, leprosy, respiratory, and rinse.

References

Liang, K.Y. and Zeger, S.L. (1986) Longitudinal data analysis using generalized linear models. Biometrika, 73, 13–22.

Touloumis, A. (2026) Bias-Reduced GEE via Adjusted Estimating Equations, with Odds-Ratio Extensions. Preprint.

Touloumis, A. (2026) Jeffreys-Type Penalized GEE for Correlated Binary Data with an Odds-Ratio Parameterization. Preprint.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.