|
13 | 13 | #' |
14 | 14 | #' @section srrstats compliance: |
15 | 15 | #' . |
16 | | -#' @srrstats {G1.1} Grounded in information-theoretic model selection (AIC/BIC) |
17 | | -#' and multivariable survival optimization (Cox/log-rank) via exhaustive grid |
18 | | -#' search (k <= 2) and genetic algorithms via `rgenoud` (k > 2). Whereas tools |
19 | | -#' like `survminer` and `cutpointr` focus strictly on univariate single splits |
20 | | -#' (k = 1), OptSurvCutR optimizes multiple thresholds simultaneously under active |
21 | | -#' covariate adjustment with bootstrap stability validation. Accelerated using |
22 | | -#' base `Rcpp` (`src/matrix_factory.cpp`) for discrete index binning without external |
23 | | -#' linear algebra libraries. |
| 16 | +#' @srrstats {G1.1} This package implements an established approach — outcome-oriented |
| 17 | +#' cut-point selection for censored survival data — and extends it in four key |
| 18 | +#' directions. The methodological origin is the maximally selected rank statistic |
| 19 | +#' (Miller & Siegmund 1982; Lausen & Schumacher 1992), in which a log-rank statistic |
| 20 | +#' is maximised over candidate thresholds and the resulting p-value corrected for the |
| 21 | +#' selection. Faraggi & Simon (1996) established by simulation that uncorrected |
| 22 | +#' selection inflates Type I error and biases effect estimates, and Rota et al. (2015) |
| 23 | +#' compared correction strategies for censored outcomes. These references define the |
| 24 | +#' single-threshold problem that `maxstat`, `survminer::surv_cutpoint()`, and |
| 25 | +#' `cutpointr` address. |
| 26 | +#' |
| 27 | +#' Those packages are not deficient implementations of a multi-threshold method; the |
| 28 | +#' multi-threshold problem is outside their stated scope. `cutpointr` is designed for |
| 29 | +#' binary classification metrics and optimises a single cut-point over measures such as |
| 30 | +#' the Youden index; `maxstat` computes asymptotic approximations and exact null |
| 31 | +#' distributions of maximally selected rank statistics for a single split; `survminer` |
| 32 | +#' provides a plotting-oriented interface to the latter. Where a single unadjusted |
| 33 | +#' threshold answers the question, these remain appropriate tools. |
| 34 | +#' |
| 35 | +#' `OptSurvCutR` addresses four methodological problems that fall outside that scope: |
| 36 | +#' 1. Number of thresholds: Treated as a model selection problem rather than fixed a |
| 37 | +#' priori, using information criteria (Akaike 1974; Schwarz 1978) across candidate |
| 38 | +#' complexities. |
| 39 | +#' 2. Simultaneous optimisation: Multiple thresholds are optimised simultaneously rather |
| 40 | +#' than sequentially, using exhaustive enumeration for k <= 2 and an evolutionary |
| 41 | +#' genetic algorithm (Mebane & Sekhon 2011, via `rgenoud`) for k > 2, avoiding the |
| 42 | +#' path-dependence of hierarchical splitting. |
| 43 | +#' 3. Confounder control: Thresholds are selected within a multivariable Cox model |
| 44 | +#' (Cox 1972), evaluating candidate boundaries conditionally on clinical covariates |
| 45 | +#' rather than marginally. |
| 46 | +#' 4. Threshold reproducibility: Non-parametric bootstrap resampling (Efron 1979) |
| 47 | +#' re-runs the search across resampled cohorts to quantify spatial stability. While |
| 48 | +#' a permutation-corrected p-value establishes that an observed separation is unlikely |
| 49 | +#' under the null, the bootstrap CI reports whether the threshold coordinate itself |
| 50 | +#' is reproducible across comparable patient samples. |
| 51 | +#' |
| 52 | +#' Numerical implementation uses base `Rcpp` (`src/matrix_factory.cpp`) for discrete |
| 53 | +#' index binning, without external linear algebra dependencies. |
24 | 54 | #' @srrstats {G1.0} References provided for Cox, log-rank, genetic optimisation. |
25 | 55 | #' @srrstats {G1.3} Systematic grid search (1–2 cuts) and `rgenoud` global |
26 | 56 | #' optimisation documented. |
27 | | -#' @srrstats {G1.5} Compared with `cutpointr` and `survminer` in package |
28 | | -#' vignette. |
| 57 | +#' @srrstats {G1.5} A feature-level comparison against `maxstat`, `survminer`, |
| 58 | +#' `CutpointsOEHR`, Evaluate Cutpoints, X-tile and Cutoff Finder is provided in the |
| 59 | +#' accompanying manuscript, and against `maxstat`/`survminer` in the bilirubin |
| 60 | +#' vignette. Numerical comparison of results across implementations is not attempted, |
| 61 | +#' as the packages address different estimands. |
29 | 62 | #' @srrstats {G1.6} Numerical stability via `survival::coxph` and `rgenoud`; |
30 | 63 | #' edge cases return `NA`. |
31 | 64 | #' @srrstats {G2.3a} Uses `match.arg()` to validate `method` and `criterion` |
|
63 | 96 | #' @srrstats {RE2.4a} Checks for collinearity among predictors. |
64 | 97 | #' @srrstats {RE2.4b} Checks for collinearity between X and Y. |
65 | 98 | #' |
66 | | -#' @details |
67 | | -#' `method = "systematic"`: grid search respecting `nmin`. Optimised via internal quantiles. |
68 | | -#' `method = "genetic"`: `rgenoud` global optimisation. |
69 | | -#' Systematic search is slow for `num_cuts > 2`; use `genetic`. |
70 | | -#' Core vector partitions are calculated in compiled C++ via `Rcpp` for optimal performance. |
71 | | -#' |
72 | 99 | #' @references |
73 | | -#' Altman, D. G., Lausen, B., Sauerbrei, W., & Schumacher, |
74 | | -#' M. (1994). Dangers of Using “Optimal” Cutpoints in the Evaluation of |
75 | | -#' Prognostic Factors. *JNCI: Journal of the National Cancer Institute*, |
76 | | -#' 86(11), 829–835. \doi{10.1093/jnci/86.11.829} |
| 100 | +#' Akaike, H. (1974). A new look at the statistical model identification. |
| 101 | +#' *IEEE Transactions on Automatic Control*, 19(6), 716–723. |
| 102 | +#' \doi{10.1109/TAC.1974.1100705} |
| 103 | +#' |
| 104 | +#' Altman, D. G., Lausen, B., Sauerbrei, W., & Schumacher, M. (1994). Dangers |
| 105 | +#' of using "optimal" cutpoints in the evaluation of prognostic factors. |
| 106 | +#' *JNCI: Journal of the National Cancer Institute*, 86(11), 829–835. |
| 107 | +#' \doi{10.1093/jnci/86.11.829} |
| 108 | +#' |
| 109 | +#' Cox, D. R. (1972). Regression models and life-tables. *Journal of the |
| 110 | +#' Royal Statistical Society: Series B (Methodological)*, 34(2), 187–202. |
| 111 | +#' \doi{10.1111/j.2517-6161.1972.tb00899.x} |
| 112 | +#' |
| 113 | +#' Efron, B. (1979). Bootstrap methods: Another look at the jackknife. |
| 114 | +#' *The Annals of Statistics*, 7(1), 1–26. \doi{10.1214/aos/1176344552} |
| 115 | +#' |
| 116 | +#' Faraggi, D., & Simon, R. (1996). A simulation study of cross-validation for |
| 117 | +#' selecting an optimal cutpoint in univariate survival analysis. |
| 118 | +#' *Statistics in Medicine*, 15(20), 2203–2213. |
| 119 | +#' \doi{10.1002/(SICI)1097-0258(19961030)15:20<2203::AID-SIM357>3.0.CO;2-G} |
| 120 | +#' |
| 121 | +#' Lausen, B., & Schumacher, M. (1992). Maximally selected rank statistics. |
| 122 | +#' *Biometrics*, 48(1), 73–85. \doi{10.2307/2532740} |
| 123 | +#' |
| 124 | +#' Mantel, N. (1966). Evaluation of survival data and two new rank order |
| 125 | +#' statistics arising in its consideration. *Cancer Chemotherapy Reports*, |
| 126 | +#' 50(3), 163–170. |
| 127 | +#' |
| 128 | +#' Mebane Jr, W. R., & Sekhon, J. S. (2011). Genetic optimization using |
| 129 | +#' derivatives: The rgenoud package for R. *Journal of Statistical Software*, |
| 130 | +#' 42(11), 1–26. \doi{10.18637/jss.v042.i11} |
77 | 131 | #' |
78 | | -#' Cox, D. R. (1972). Regression Models and Life-Tables. *Journal |
79 | | -#' of the Royal Statistical Society: Series B (Methodological)*, 34(2), |
80 | | -#' 187–202. \doi{10.1111/j.2517-6161.1972.tb00899.x} |
| 132 | +#' Miller, R., & Siegmund, D. (1982). Maximally selected chi square statistics. |
| 133 | +#' *Biometrics*, 38(4), 1011–1016. \doi{10.2307/2529881} |
81 | 134 | #' |
82 | | -#' Mantel, N. (1966). Evaluation of survival data and two new |
83 | | -#' rank order statistics arising in its consideration. *Cancer |
84 | | -#' Chemotherapy Reports*, 50(3). |
| 135 | +#' Rota, M., Antolini, L., & Valsecchi, M. G. (2015). Optimal cut-point |
| 136 | +#' definition in biomarkers: The case of censored failure time outcome. |
| 137 | +#' *BMC Medical Research Methodology*, 15(1), 24. |
| 138 | +#' \doi{10.1186/s12874-015-0009-y} |
85 | 139 | #' |
86 | | -#' Mebane Jr, W. R., & Sekhon, J. S. (2011). Genetic |
87 | | -#' Optimisation Using Derivatives: The rgenoud Package for R. |
88 | | -#' *Journal of Statistical Software*, 42, 1–26. |
89 | | -#' \doi{10.18637/jss.v042.i11} |
| 140 | +#' Schwarz, G. (1978). Estimating the dimension of a model. *The Annals of |
| 141 | +#' Statistics*, 6(2), 461–464. \doi{10.1214/aos/1176344136} |
90 | 142 | #' |
91 | 143 | #' @param data A data frame containing the analysis variables. |
92 | 144 | #' @param predictor The continuous predictor variable name (character). |
|
0 commit comments