Package 'CauchyCP'

Title: Powerful Test for Survival Data under Non-Proportional Hazards
Description: An omnibus test of change-point Cox regression models to improve the statistical power of detecting signals of non-proportional hazards patterns. The technical details can be found in Hong Zhang, Qing Li, Devan Mehrotra and Judong Shen (2021) <arXiv:2101.00059>. Extensive simulation studies demonstrate that, compared to existing tests under non-proportional hazards, the proposed CauchyCP test 1) controls the type I error better at small alpha levels; 2) increases the power of detecting time-varying effects; and 3) is more computationally efficient.
Authors: Hong Zhang
Maintainer: Hong Zhang <[email protected]>
License: GPL-2
Version: 0.1.1
Built: 2025-01-10 07:34:04 UTC
Source: https://github.com/cranhaven/cranhaven.r-universe.dev

Help Index


A robust test under non-proportional hazards using Cauchy combination of change-point Cox regressions.

Description

A robust test under non-proportional hazards using Cauchy combination of change-point Cox regressions.

Usage

CauchyCP(time, status, x, covar = rep(1, length(time)),
  cutpoints = c(0, quantile(time[status == 1])[2:4]))

Arguments

time

- Follow up time for right censored data.

status

- The event status indicator, 0=censored, 1=event.

x

- The variable of interest, e.g. a treatment indicator.

covar

- The matrix of covariates. If no covariates, a vector of ones should be used (default).

cutpoints

- The pre-specified change-points. The default choice is a vector of 0th, 25th, 50th and 75th percentiles of the event time.

Value

1. A matrix of estimated hazard ratios before and after the change-points. 2. the vector of p-values corresponding to the change-points. 3. a final p-value.

References

Hong Zhang, Qing Li, Devan Mehrotra and Judong Shen. "CauchyCP: a powerful test under non-proportional hazards using Cauchy combination of change-point Cox regressions", arXiv:2101.00059.

Examples

data(gast)
CauchyCP(time=gast$time, status=gast$status, x=gast$trt)

Example 1: gastric carcinoma trial data

Description

A two-arm gastric carcinoma clinical trial: ninety patients with locally advanced, non-resectable gastric carcinoma received either chemotherapy alone (N = 45) or chemotherapy plus radiation (N = 45).

Usage

gast

Format

A data frame with 90 rows and 3 variables:

trt

treatment indicator, 1=chemotherapy + radiation, 0=chemotherapy alone.

status

event indicator, 1=death, 0=censored.

time

follow up time, in days

Source

K. R. Hess, Assessing time-by-covariate interactions in proportional hazards regression models using cubic spline functions, Statistics in medicine 13 (10) (1994) 1045–1062.