# Find an Optimal Cutoff for the 2-group Model

### Description

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.

### Usage

1 |

### Arguments

`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 |

### Value

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.

### Examples

1 2 3 4 5 6 7 |