MyNixOS website logo
Description

Bias-Reduced and Penalized Generalized Estimating Equations.

Fits marginal regression models for repeated or clustered responses using generalized estimating equations (GEE). Provides ordinary GEE estimators, bias-reduced and bias-corrected GEE estimators, and Jeffreys-type penalized GEE estimators for binary, count and continuous responses. Methods are described in Touloumis (2026a) <doi:10.48550/arXiv.2606.16043> and Touloumis (2026b) <doi:10.48550/arXiv.2606.16058>.

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:

  • geewa() for continuous, binary, and count responses (Gaussian, Poisson, binomial, Gamma, inverse Gaussian, quasi, quasibinomial, and quasipoisson families).
  • geewa_binary() for binary responses via a marginalized odds-ratio parameterization.

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

MethodDescription
"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:

  • summary(), print() — coefficient table and model summary.
  • coef(), vcov(), confint() — estimates, covariance matrices, and confidence intervals.
  • fitted(), residuals(), predict() — fitted values and predictions.
  • model.matrix() — design matrix.
  • tidy(), glance() — tidy summaries following broom conventions.

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

  • anova() — sequential or multi-model hypothesis test tables.
  • add1(), drop1() — single-term additions and deletions with hypothesis tests and CIC.
  • step_p() — stepwise model selection by hypothesis testing.
  • geecriteria() — QIC, CIC, RJC, QICu, GESSC, and GPC model selection criteria.

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.

Metadata

Version

0.1.0

License

Unknown

Platforms (79)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    wasip1
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasip1
  • wasm64-wasip1
  • x86_64-cygwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows