MyNixOS website logo
Description

ROC-Based Methods for Comparing Survival Distributions with Right, Left, and Doubly Censored Data.

Implements nonparametric and semiparametric methods for comparing two survival distributions under non-proportional hazards (non-PH). The methods are based on the Receiver Operating Characteristic (ROC) curve length (Bantis et al. (2021) <doi:10.1002/sim.8869>) and the overlap coefficient (OVL) (Franco-Pereira et al. (2021) <doi:10.1177/09622802211046386>), as well as a joint ROC length-OVL-based approach. These methods do not require prior knowledge of the underlying non-PH pattern and can accommodate right, left, and doubly censored data.

ROCsurvcomp

Overview

ROCsurvcomp is an R package for comparing survival curves under non-proportional hazards (non-PH) using ROC-based methods. Traditional log-rank test may lose power when the proportional hazards assumption is violated. Other methods, such as the Fleming-Harrington (FH) family of weighted log-rank tests require prior knowledge of the underlying non-PH patterns, and incorrectly specified patterns may lead to a substantial loss of statistical power. This package provides alternative approaches for comparing survival curves based on ROC curve, without requiring prior knowledge of the underlying non-PH pattern, and can accommodate right, left, and doubly censored data.

Key Features

  • Implements nonparametric and semiparametric kernel-based approaches for comparing two survival distributions
  • Designed for handling non-proportional hazards settings
  • Methods include:
    • ROC length-based test
    • Overlap coefficient (OVL)-based test
    • Joint ROC length-OVL-based test
  • Supports right, left and doubly-censored survival data
  • Permutation-based inference with two-sided hypothesis testing

Installation

You can install the package from GitHub:

# install.packages("remotes")    # if not installed
remotes::install_github("mmrahman13/ROCsurvcomp")

Usage

Basic Example

library(ROCsurvcomp)
library(PWEXP)

# Generating right-censored data with crossing survivals
set.seed(126)
n_trt <- 50
break_trt <- c(2, 4)
rate_trt <- c(log(2)/3, log(2)/7, log(2)/20)
rate.censor_trt <- c(log(2)/55, log(2)/62, log(2)/68)
event_trt <- PWEXP::rpwexp(n_trt, rate = rate_trt, breakpoint = break_trt)
censor_trt <- PWEXP::rpwexp(n_trt, rate = rate.censor_trt, breakpoint = break_trt)

n_ctrl <- 50
rate_ctrl <- log(2)/10
rate.censor_ctrl <- log(2)/58
event_ctrl <- rexp(n_ctrl, rate = rate_ctrl)
censor_ctrl <- rexp(n_ctrl, rate = rate.censor_ctrl)

# Observed time and censoring status (0 = event, 1 = right-censored)
time_trt <- pmin(event_trt, censor_trt)
status_trt <- ifelse(event_trt <= censor_trt, 0, 1)
time_ctrl <- pmin(event_ctrl, censor_ctrl)
status_ctrl <- ifelse(event_ctrl <= censor_ctrl, 0, 1)
time <- c(time_trt, time_ctrl)
status <- c(status_trt, status_ctrl)
group <- c(rep(1, n_trt), rep(2, n_ctrl))

# Run `surv.comp()` function
# Note: n_perm = 1000 is used here only for illustration purposes. Highly recommended n_perm to be set at 50,000 or more.
surv.comp(
  time = time,
  status = status,
  group = group,
  censor_type = "right",
  method = "joint_method",
  n_perm = 1000,
  progress = TRUE,
  plot = TRUE
)

Methodology

This package implements ROC-based approaches for comparing two survival curves:

  • ROC Length: Measures separation between two distributions without relying on any stochastic ordering
  • Overlap Coefficient (OVL): Quantifies the similarity between two distributions using the common area between two probability density functions
  • Joint Test: Combines ROC length and OVL-based methods by constructing convex hull of the permuted samples based on their Euclidean distance from the origin.

These methods are especially useful when:

  • The proportional hazards assumption is violated
  • Treatment effects are not constant over time and no prior information about the pattern of effects is available
  • Survival curves cross.

Authors

Mohammod Mahmudur Rahman
PhD Student, Department of Biostatistics & Data Science
University of Kansas Medical Center

Leonidas Bantis
Associate Professor, Department of Biostatistics & Data Science
University of Kansas Medical Center.

Metadata

Version

0.1.2

License

Unknown

Platforms (80)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    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-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-uefi
  • x86_64-windows