MyNixOS website logo
Description

Binary Endpoint Estimation with Covariate Adjustment.

Performs estimation of marginal treatment effects for binary outcomes when using logistic regression working models with covariate adjustment (see discussions in Magirr et al (2024) <https://osf.io/9mp58/>). Implements the variance estimators of Ge et al (2011) <doi:10.1177/009286151104500409> and Ye et al (2023) <doi:10.1080/24754269.2023.2205802>.

Binary Endpoint Estimation with Covariate Adjustment

Lifecycle: stable CRAN status R-CMD-check

The goal of beeca is to provide an implementation solution with a simple user interface to estimate marginal estimands in a binary endpoint setting with covariate adjustment. The primary aim of this lightweight implementation is to facilitate quick industry adoption and use within GxP environments. A secondary aim is to support the simulation studies included in the manuscript Magirr et al. (2024).

Installation

TypeSourceCommand
ReleaseCRANinstall.packages("beeca")
DevelopmentGitHubremotes::install_github("openpharma/beeca")

Methodology

Motivated by the recent FDA guidance (2023) on "Adjusting for Covariates in Randomized Clinical Trials for Drugs and Biological Products Guidance for Industry"" and its recommendations on robust variance estimation, we implemented two approaches, namely Ge et al. (2011) and Ye et al. (2023), to perform variance estimation for a treatment effect estimator based on g-computation under a logistic regression working model.

Scope

The package is designed to estimate marginal (unconditional) estimands in a binary endpoint setting with covariate adjustment. It is suited for 2-arm clinical trials with or without covariate adaptive (stratified permuted block or biased coin) randomization where the summary measure of the marginal estimand is one of (risk difference, odds ratio, risk ratio, log odds ratio, log risk ratio). For practical considerations on the implications of covariate adjustment in superiority vs non-inferiority trials, please see Nicholas et al. (2015) and Morris et al. (2022).

Example

This is a basic example which shows how to obtain the point and variance estimates of a marginal estimand with covariate adjusted working model:

library(beeca)

## Set treatment to a factor
trial01$trtp <- factor(trial01$trtp)

## Fit a logistic regression working model and pass it to beeca
fit1 <- glm(aval ~ trtp + bl_cov, family="binomial", data=trial01) |>
  get_marginal_effect(trt="trtp", method="Ye", contrast="diff")

## View the results in Analysis Results Data (ARD) structure
fit1$marginal_results

Package documentation

The package documentation can be found here. For a brief overview of the different estimands and their estimation, please see vignette vignette("estimand_and_implementations").

Quality checks

Where possible we have cross checked the {beeca} package with alternative implementations in SAS and R. For example, the Ge et al. method which applies the delta method has been cross checked against the SAS%margins macro and the R packages {margins} and {marginaleffects}. The Ye et al. method has been cross checked against {RobinCar}.

Package authors

Acknowledgments

Our lightweight implementation was inspired and aided by the more comprehensive {RobinCar} package, developed by Marlena Bannick, Ting Ye et al. We thank the ASA-BIOP Covariate Adjustment Scientific Working Group for valuable feedback and discussions.

Further development of covariate adjustment software is by the Software Subteam of ASA-BIOP Covariate Adjustment Scientific Working Group.

References

Metadata

Version

0.1.3

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • 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-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
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • 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-windows