grhoTests: Summary of Survival Curve differences using G-rho tests

View source: R/grhoTests.R

grhoTestsR Documentation

Summary of Survival Curve differences using G-rho tests

Description

Runs the log-rank test and Breslow test to test for difference between two or more survival curves.

Usage

grhoTests(formula, data, digits = 4)

Arguments

formula

formula expression of the form Surv(time, status) ~ predictors

data

data frame where variables from formula originate

digits

number of significant digits to retain

Details

The log-rank test corresponds to rho = 0 and the Breslow test corresponds to rho = 1 in survdiff. This function emulates the "Overall Comparisons" table output from SPSS.

Value

The Chi-Square statistic, degrees of freedom, and p-value are given for both G-rho tests.

Author(s)

Derek Chiu

Examples

library(survival)
grhoTests(Surv(futime, fustat) ~ rx, data = ovarian)

TalhoukLab/biostatUtil documentation built on April 14, 2025, 4:15 a.m.