1. Purpose
This tool finds the optimal cutpoint for continuous variables in survival analysis. Instead of using the median as a one-size-fits-all solution, it tests all possible cutpoints and selects the one that maximizes the survival difference between groups.
2. Methods
- BDS-Cut (Bootstrap Density-Stabilized Cutpoint): Two-stage procedure: (1) brute-force scan all candidate cutpoints for visualization; (2) stabilize via 200 bootstrap replications, reporting the density peak as the final cutpoint. More stable and less prone to overfitting than raw optimum.
- MaxStat (Maximally Selected Rank Statistics): Uses the maxstat package to find the cutpoint that maximizes the log-rank statistic, with a multiplicity-corrected p-value (conditional Monte Carlo). This is the recommended method when a valid p-value is needed for hypothesis testing.
- Median / Tertile / Quartile: Traditional quantile-based splitting.
- Custom: User-specified cutpoint value(s).
3. Output
- LogRank_P: P-value from log-rank test comparing survival curves.
- Adjusted_P (MaxStat only): Multiplicity-corrected p-value from maxstat.test (Lau94). This corrects for the multiple testing inherent in scanning all cutpoints.
- HR: Hazard ratio from Cox model (High vs Low for BDS-Cut; Gn vs G1 for quantile methods).
- BS_Stability (BDS-Cut only): Bootstrap stability flag. Stable (>0.8): reproducible across bootstrap samples. Moderate (0.5-0.8): interpret with caution. Unstable (<0.5): driven by chance; do not use.
- BS_CI (BDS-Cut only): 95% confidence interval of the bootstrap cutoff distribution.
4. Caution
Note: The BDS-Cut method searches all possible cutpoints, which inflates Type I error. The reported p-value is not corrected for multiple testing. Always validate the selected cutpoint in an independent cohort. See Altman et al. (1994) JNCI.
5. Algorithm Principles (原理说明)
This tool implements a two-stage, bootstrap-stabilized cutpoint procedure for continuous predictors in right-censored survival data. It is designed as an exploratory stabilization strategy, not as a significance-testing framework.
5.1 Stage 1 - Brute-force scan (exploration only)
For a continuous variable X, all interior candidate cutpoints c are examined under the constraint that each side retains at least max(10%, 5) of observations. For each c, subjects are split into G_L = {X ≤ c} and G_H = {X > c}, and a two-sample log-rank statistic is computed:
χ²(c) = (O_L - E_L)²/V_L + (O_H - E_H)²/V_H
The raw optimum is: ĉ_raw = arg min_c p_logrank(c)
This raw optimum is known to suffer from selection bias : scanning many c under H_0 inflates Type I error (Altman et al., 1994; Lausen & Schumacher, 1992). Therefore ĉ_raw and its associated p are never used for inference in this tool; they only drive the scan plot.
5.2 Stage 2 - Bootstrap density-peak stabilization
We draw B = 200 bootstrap samples with replacement from (X, T, δ). On each bootstrap sample b, the same brute-force scan is repeated, yielding ĉ_raw^(b). Let C = {ĉ_raw^(b) : b = 1,...,B, valid}.
The reported cutpoint is the mode of the bootstrap distribution, approximated by the peak of a kernel density estimate:
ĉ_stable = arg max_x f̂_KDE(x; C)
Rationale: the raw optimum is a high-variance estimator (sensitive to single observations); the bootstrap distribution reveals which region of X consistently separates groups. The density peak is a post-selection stabilizer, conceptually aligned with bootstrap aggregation of cutpoints (Thiele, 2021; cutpointr vignette).
5.3 What we report, and what we deliberately do NOT report
| Quantity | Reported? | Notes |
|---|---|---|
| ĉ_stable | ✓ | Density peak of bootstrap cutpoints |
| Bootstrap 95% CI of ĉ | ✓ | 2.5%-97.5% quantiles of C |
| Stability index 1-SD(C)/|median(C)| | ✓ | Flag: Stable (>0.8), Moderate (0.5-0.8), Unstable (<0.5) |
| KM curve at ĉ_stable | ✓ | Descriptive only |
| Log-rank p at ĉ_stable on full data | ✓ (labeled "uncorrected") | Exploratory, not adjusted for cutpoint search |
| HR (High vs Low) at ĉ_stable | ✓ | Optimistic: conditional on selected cutpoint |
| Multiplicity-corrected p-value | ✗ | Use maxstat::maxstat.test() or exact distribution methods for that |
| Optimism-corrected p / HR | ✗ | Use Harrell-style bootstrap validation externally |
5.4 Why this is not a 'new test'
The density-peak selector reduces estimation instability but does not correct the selection-induced Type I error inflation (Hothorn & Lausen, 2003; Li et al., 2023). Thus:
- For hypothesis testing ('is this biomarker prognostic?'), report maxstat::maxstat.test() alongside.
- For exploratory threshold generation ('which cutoff is worth validating externally?'), this tool's output is sufficient.
- Any cutpoint from this tool must be validated in an independent cohort before clinical use.
5.5 Minimum data requirements (enforced)
- Total n ≥ 10 (soft gate; warning otherwise)
- Total events ≥ 30 recommended
- Each side of any candidate cutpoint ≥ 5 events ideally (10% rule is sample-size guard, not event guard)
6. References
- Altman DG, Lausen B, Sauerbrei W, Schumacher M. Dangers of using 'optimal' cutpoints in the evaluation of prognostic factors. J Natl Cancer Inst. 1994;86(11):829-835.
- Lausen B, Schumacher M. Maximally selected rank statistics. Biometrics. 1992;48(1):73-85.
- Hothorn T, Lausen B. On the exact distribution of maximally selected rank statistics. Comput Stat Data Anal. 2003;43(2):121-137.
- Hollander N, Sauerbrei W, Schumacher M. Confidence intervals for the effect of a prognostic factor after selection of an 'optimal' cutpoint. Stat Med. 2004;23(11):1701-1713.
- Contal C, O'Quigley J. An application of changepoint methods in studying the effect of age on survival in breast cancer. Comput Stat Data Anal. 1999;30(3):253-270.
- Thiele C, Hirschfeld G. cutpointr: Improved estimation and validation of optimal cutpoints in R. J Stat Softw. 2021;98(11):1-27.
- Li N, Song Y, Lin CD, Tu D. Bootstrap adjustment to minimum p-value method for predictive classification. Stat Sin. 2023;33(3):2065-2086.
- Hothorn T, Lausen B. Maximally Selected Rank Statistics in R (maxstat package vignette). CRAN.
- Thiele C. Robust cutpoint estimation (cutpointr package vignette). CRAN.
7. Citation
If you use BDS-Cut in a publication, please cite: We used the bootstrap density-peak stabilized cutpoint (BDS-Cut) procedure as implemented in KMcutoff (math81.com) for exploratory threshold generation, with external validation planned per Altman 1994.