best_cutoff2 | R Documentation |
The "best_cutoff" function is used to find the best cutoff point for a continuous variable in survival analysis. It takes input data ("pdata") containing a continuous variable ("variable") and survival information ("time" and "status"). It returns the modified input data with a new binary variable created based on the best cutoff point.
best_cutoff2(
pdata,
variable,
time = "time",
status = "status",
PrintResult = T
)
pdata |
phenotype data with survival information and features |
variable |
The name of the continuous variable in the input data for which the best cutoff needs to be determined. |
time |
The name of the column in the input data representing the time-to-event (survival time). The default value is "time". |
status |
The name of the column in the input data representing the event status (censoring information). The default value is "status". |
PrintResult |
A logical value indicating whether to print the results. The default value is TRUE. |
pdata with binary variables and best cutoff
Dongqiang Zeng
# Loading TCGA-STAD microenvironment signature data
data("sig_stad", package = "IOBR")
# Finding the best cutoff value of TMEscore for survival
sig_stad2 <- best_cutoff2(pdata = sig_stad, variable = "TMEscore_CIR", time = "OS_time",status = "OS_status", PrintResult = T)
sig_stad2$best_cutoff
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.