This function uses a brute force method to search for the best cutoff value for a marker based on the log rank test to divide patients into high and low risk groups given survival data.
1 |
data |
A data frame or numerical matrix |
stime |
A character string that tells the column name for survival time in the data |
sind |
A character string that tells the column name for censoring indicator in the data |
var |
A character string that tells the column name for marker values in the data |
leave |
Minimum number of patients in the resulting high and low risk groups |
It returns a data frame with the input data as well as the final optimal high and low risk groupings saved in the column bestcut2 (1=high risk and 0=low risk). Additionally, it has columns such as the cutoff value for the marker, the chi-square statistics and the log rank p values for testing equality of survival in the resulting high and low risk groups from using each possible marker value as cutoff.
1 2 3 4 5 6 7 |
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.