Skip to contents

Compute the log-rank test p-value for the difference between the two survival curves obtained by splitting a dataset into a "low" and "high" risk group using a given relative-risk threshold.

Usage

tof_log_rank_test(
  input_data,
  relative_risk_col,
  time_col,
  event_col,
  threshold
)

Arguments

input_data

A tbl_df or data.frame in which each observation is a row.

relative_risk_col

An unquote column name indicating which column contains the relative-risk estimates for each observation.

time_col

An unquoted column name indicating which column contains the true time-to-event information for each observation.

event_col

An unquoted column name indicating which column contains the outcome (event or censorship). Must be a binary column - all values should be either 0 or 1 (with 1 indicating the adverse event and 0 indicating censorship) or FALSE and TRUE (with TRUE indicating the adverse event and FALSE indicating censorship).

threshold

A numeric value indicating the relative-risk threshold that should be used to split observations into low- and high-risk groups.

Value

A numeric value <1, the p-value of the log-rank test.

Examples

NULL
#> NULL