
Derive percentile-based biomarker cutoffs using adjusted risk
Source:R/derive_cutoffs_percentile.R
derive_cutoffs_percentile.RdImplements a two-cutoff approach to classify subjects into rule-out, rule-in, or indeterminate zones using confounder-adjusted risk scores.
Usage
derive_cutoffs_percentile(
adjust_result,
biomarker,
low_thresh = 0.05,
high_thresh = 0.7,
low_pct = 0.8,
high_pct = 0.2
)Arguments
- adjust_result
Output list from
adjust_score(), containing the dataset with biomarker, adjusted_risk, and outcome.- biomarker
Character, name of biomarker column.
- low_thresh
Numeric, threshold for defining the low-risk group (default = 0.05). Very small datasets may produce too few low-risk subjects at extreme thresholds, triggering fallback cutoffs.
- high_thresh
Numeric, threshold for defining the high-risk group (default = 0.70). Very small datasets may produce too few high-risk subjects at extreme thresholds, triggering fallback cutoffs.
- low_pct
Numeric, percentile used to derive the rule-out cutoff within the low-risk group (default = 0.80).
- high_pct
Numeric, percentile used to derive the rule-in cutoff within the high-risk group (default = 0.20).
Value
List with rule-out cutoff (c_L), rule-in cutoff (c_H),
classification vector, and augmented dataset.
Details
Method
The function uses
adjusted_risk(fromadjust_score()) to define clinically meaningful risk groups.Low-risk group: subjects with adjusted risk <
low_thresh(default 0.05), representing individuals unlikely to have disease. The rule-out cutoff (c_L) is defined as the 80th percentile of biomarker values within this group.High-risk group: subjects with adjusted risk greater than
high_thresh(default 0.70), representing individuals likely to have disease. The rule-in cutoff (c_H) is defined as the 20th percentile of biomarker values within this group.If either group is too small, fallback cutoffs are used based on the global biomarker distribution (5th and 95th percentiles).
Final classification: biomarker <
c_L"Negative"; biomarker >c_H"Positive"; otherwise "Indeterminate".
References
Giacomucci, G., Crucitti, C., Ingannato, A., et al. (2025). The two cut-offs approach for plasma p-tau217 in detecting Alzheimer's disease. Alzheimer's & Dementia: Diagnosis, Assessment & Disease Monitoring, 17:e70116.
Hazan, J., Liu, K.Y., Isaacs, J.D., Howard, R. (2025). Cut-points and gray zones: The challenges of integrating Alzheimer's disease plasma biomarkers into clinical practice. Alzheimer's & Dementia, 21:e70113.
Examples
n <- 500
set.seed(123)
# outcome
DISEASE <- rbinom(n, 1, 0.35)
# biomarker depends on disease
PTAU <- rnorm(n, mean = 25 + 10 * DISEASE, sd = 8)
# confounders (optional noise)
AGE <- round(rnorm(n, 73, 7))
SEX <- sample(c(0, 1), n, replace = TRUE)
BMI <- rnorm(n, 25, 4)
HTN <- rbinom(n, 1, 0.3)
DM <- rbinom(n, 1, 0.2)
df <- data.frame(PTAU, AGE, SEX, BMI, HTN, DM, DISEASE)
res <- adjust_score(
df,
biomarker = "PTAU",
outcome = "DISEASE",
confounders = c("AGE","SEX","BMI","HTN","DM")
)
#> number of iterations= 704
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
cutoffs <- derive_cutoffs_percentile(res, biomarker = "PTAU")
#> Number of cases below low_thresh = 0.05 is too small, so fallback to 5th percentile of biomarker was used. Consider using another low_thresh value if your dataset is small.
cutoffs$c_L; cutoffs$c_H
#> [1] 13.30872
#> [1] 36.84693
table(cutoffs$class)
#>
#> Indeterminate Negative Positive
#> 373 25 102