View source: R/modeling_helpers.R
tof_log_rank_test | R Documentation |
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.
tof_log_rank_test(
input_data,
relative_risk_col,
time_col,
event_col,
threshold
)
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. |
A numeric value <1, the p-value of the log-rank test.
NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.