findCutpointByCoxph: Find cutpoint by Cox model statistics

View source: R/findCutpointByCoxph.R

findCutpointByCoxphR Documentation

Find cutpoint by Cox model statistics

Description

Try to find a single cutpoint by maximizing the hazard ratio or minimizing the AIC.

Usage

findCutpointByCoxph(input.d, surv.formula)

Arguments

input.d

input data, typically a matrix or data frame

surv.formula

a formula of type Surv(time, status) ~ x, where x is the variable of interest.

Details

The formula must be univariable.

Value

best cutpoint as determined by different metrics. Returns NA if surv.formula is not univariable, the variable is not numeric, or there is no variation in the variable of interest.

Warning

surv.formula cannot be multivariable. For example, Surv(time, status) ~ x + age won't work but Surv(time, status) ~ x is fine.

Author(s)

Samuel Leung, Derek Chiu


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