Optimal Cutoff logo

OPTIMALCUTOFF

turn continuous data into clinically actionable decisions by identifying optimal cutoff points for patient stratification





Version 1.0 (2026.08.29)
Contact
Endorsed by ELIXIR Hungary.
elixir_logo
Settings
Group colors

Data table


Analysis filters


OptimalCutoff User Guide

1. Quick start

Which analysis should I use?

Research question Recommended analysis
Can a continuous marker distinguish two outcome groups? ROC analysis: Youden index, Closest to (0,1), or Maximizing
Do I want to evaluate several markers against the same binary outcome? Binary ROC with multiple variables selected
Does the outcome contain more than two categories? Multiclass ROC: One-vs-Rest or One-vs-One
Do I want to divide patients into groups according to a marker and compare survival? Survival analysis
Do I want to evaluate discrimination at one or more follow-up times while accounting for censoring? Time-dependent ROC

Typical workflow

  1. Select a data source: edit the table, upload a file, or load the demo dataset.
  2. Inspect the dataset on the Data & filters tab and define any general filters.
  3. Select the required statistical analysis in the left sidebar.
  4. Select the marker, outcome/status, time variable, and other analysis-specific settings.
  5. Optionally adjust plot settings.
  6. Click Run analysis.
  7. Review the numerical results and plots on the Results tab.
  8. Download the required tables, plot data, or figures.
Run snapshot: the statistical analysis uses the filtered dataset captured when Run analysis is clicked. If the data or filters are changed afterwards, run the analysis again to create a new statistical snapshot.

Plot formatting controls are intended to modify presentation. Statistical choices, data changes, filters, or analysis settings should be followed by a new analysis run.

2. Data & filters

Data structure

Data should be arranged in a rectangular table: one row per observation and one column per variable. Biomarkers used in ROC or survival cut-off analyses should be numeric. A unique patient or sample identifier may be included as an additional column.

Supported input

  • Edit or paste data directly into the table.
  • Upload a CSV, XLS, or XLSX file.
  • Load the built-in demo dataset.

General analysis filters

Filters defined on the Data & filters tab are applied before any statistical analysis. Up to 10 filters can be defined. When several filters are active, they are combined using AND, meaning that an observation must satisfy every active filter to remain in the analysis dataset.

The available conditions are:

  • Equals / Does not equal
  • Greater than / Greater than or equal to
  • Less than / Less than or equal to
  • In list / Not in list
  • Contains / Does not contain
  • Is missing or blank / Is not missing or blank
General filters and analysis-specific exclusions are different. After the general filters are applied, each analysis may still exclude observations with missing or invalid marker, status, or survival-time values. This is why the final valid N can be smaller than the number of rows shown after general filtering.

Filtered preview

Use Show / hide filtered preview to inspect the rows that would enter the next analysis run before analysis-specific eligibility rules are applied.

3. Binary ROC analysis

Purpose

Binary ROC analysis evaluates how well a continuous marker discriminates between two outcome groups and identifies a cut-off according to the selected criterion.

Required inputs

  • Marker variable: a numeric test or biomarker.
  • Status column: a variable containing exactly two outcome groups.
  • Positive class: the outcome category that should be treated as the positive/event group.

ROC direction

The ROC direction is selected automatically. The result therefore also reports the classification rule, showing whether values above or below the selected threshold are classified as positive. Always interpret the threshold together with this rule.

Cut-off methods

Youden index
Selects the threshold that maximizes Sensitivity + Specificity - 1. It gives equal emphasis to sensitivity and specificity.
Closest to (0,1)
Selects the ROC point with the shortest distance to the ideal point representing 100% sensitivity and 100% specificity.
Maximizing
Selects the threshold that maximizes one chosen performance measure: Sensitivity, Specificity, PPV, or NPV.
A cut-off that maximizes a single metric can be extreme. For example, maximizing sensitivity alone may produce poor specificity. The selected method should reflect the intended clinical or research use of the marker.

Main outputs

  • AUC
  • Selected threshold and classification rule
  • Accuracy, sensitivity, specificity, PPV, and NPV
  • TP, TN, FP, and FN
  • Confusion matrix
  • Descriptive statistics, density plot, and boxplot
  • Performance values across all evaluated thresholds

If more than one threshold is equally optimal, OptimalCutoff reports the number of tied optimal thresholds and uses a deterministic rule to select one representative threshold.

4. Multiple variables in ROC analysis

More than one numeric marker can be selected in the binary ROC module. Enable Multiple variables in one plot to display the selected markers together. Each marker is analysed against the same binary status definition and receives its own ROC curve, AUC, threshold, and diagnostic performance results.

Displaying several ROC curves together is useful for visual comparison, but visual differences between AUCs are not by themselves a statistical test of the difference.

Missing marker values are handled separately for each marker, so valid N may differ across curves even when the same outcome variable is used.

5. Multiclass ROC analysis

Purpose

Use multiclass ROC when the status variable contains more than two outcome categories. The module converts the multiclass problem into interpretable binary contrasts.

One-vs-Rest (OVR)

Each class is treated as the positive class in turn and is compared with all remaining classes combined. For three groups A, B, and C, the contrasts are A vs rest, B vs rest, and C vs rest.

One-vs-One (OVO)

Classes are compared pairwise. For three groups A, B, and C, the possible contrasts are A vs B, A vs C, and B vs C. Specific class pairs can be selected. In a displayed A vs B pair, the second class is treated as the positive class for the binary ROC contrast; the classification rule is shown in the results.

Cut-off selection

Youden index, Closest to (0,1), and Maximizing Sensitivity/Specificity/PPV/NPV are available for each binary contrast. The same interpretation described for binary ROC applies.

When at least three classes are available, the analysis can also report an overall multiclass AUC in addition to the individual binary contrasts.

6. Survival cut-off analysis

Purpose

Survival analysis divides observations into groups according to a marker or cohort variable and evaluates time-to-event differences using Kaplan-Meier and Cox regression methods.

Required inputs

  • Marker variable: numeric marker used for grouping, unless a two-value cohort variable is used.
  • Survival time: non-negative follow-up time.
  • Time unit: days, weeks, months, or years for labelling the plots and results.
  • Status: binary event indicator. Using 0 = censored and 1 = event is recommended.

Predefined cut-offs

Median, lower quartile, lower tertile, upper tertile, and upper quartile cut-offs are available. These cut-offs use empirical ranked observations rather than interpolated quantiles. The standard grouping rule is: low ≤ cut-off and high > cut-off.

Manual cut-off

Enter a fixed numerical cut-off. The cut-off value itself is assigned to the low group: low ≤ cut-off; high > cut-off.

Automatic cut-off selection

Automatic selection evaluates candidate cut-offs between the empirical first and third quartile ranks. Candidate cut-offs can be generated from expression values or empirical percentiles. Identical cut-off values caused by ties are collapsed. The selected cut-off is the candidate with the smallest Cox score-test P value, and Benjamini-Hochberg FDR values are reported for the cut-off scan.

Automatic cut-off searching is a discovery procedure. Choosing the best cut-off in the same dataset used to evaluate its performance can produce optimistic results. A selected cut-off should ideally be locked and evaluated without modification in an independent validation dataset.

Trichotomization

  • T1 vs T3: compares the lower and upper empirical tertile groups.
  • Q1 vs Q4: compares the lower and upper empirical quartile groups.

The middle observations are omitted from these comparisons.

Follow-up threshold

If a follow-up threshold is enabled, follow-up is administratively censored at that horizon. Events occurring after the threshold are not counted as events within the restricted follow-up period.

Use variable to set the cohorts

This option can be used when the selected analysis variable already contains exactly two cohort values. The two values define the groups directly; no numeric cut-off search or beeswarm distribution plot is used.

Multiple-variable options

When at least two variables are selected, the Multiple-variable options dialog provides additional strategies:

  • Analyze separately: each selected variable is analysed independently.
  • Mean expression: combines selected variables into a signature; optional comma-separated weights can be supplied, with negative weights reversing a variable direction.
  • Ratio: available for exactly two variables; the first variable is the numerator and the second is the denominator.
  • Median-expression filter: available for exactly two variables; the first variable is analysed after filtering patients according to high or low expression of the second variable relative to its median.
  • Correlation: Pearson and/or Spearman correlations can be calculated for 2-4 selected variables.

Cox regression and diagnostics

Univariate Cox regression is available for the marker-defined groups. Multivariable Cox regression can additionally adjust for selected covariates. The Kaplan-Meier plot and its group comparison remain based on the marker-defined groups, while the adjusted Cox results are reported separately.

The proportional hazards assumption can be checked using Cox proportional hazards diagnostics. If Invert HR values below 1 is selected, the marker group contrast may be displayed in the inverse direction to keep the reported HR above 1; the displayed contrast should therefore always be read together with the HR.

Median survival

Median survival is reported when it is estimable for both groups. If both medians cannot be estimated, the application reports the time to 75% survival for both groups as the upper-quartile survival measure.

7. Time-dependent ROC analysis

Purpose

Conventional ROC analysis does not incorporate follow-up time or censoring. Time-dependent ROC evaluates marker discrimination at specified follow-up times using cumulative/dynamic ROC methodology with inverse probability of censoring weighting (IPCW).

Required inputs

  • One or more numeric markers
  • Survival/follow-up time
  • Binary status with 0 for censoring and the selected event code for the event of interest
  • One or more evaluation times
  • Risk direction: higher or lower marker values indicate higher event risk

Evaluation times can be entered as comma-separated values or generated from the data. Only valid positive times within the observed follow-up range are analysed.

Risk direction

The time-dependent ROC implementation assumes that larger analysed marker values indicate higher event risk. Select Lower marker values = higher event risk when the original marker has the opposite direction; the application transforms the analysis direction while retaining interpretable threshold reporting.

Cut-off methods

Youden index, Closest to (0,1), and Maximizing Sensitivity/Specificity/PPV/NPV are available at the selected ROC time.

Results display

  • Over time: shows AUC(t) across the selected evaluation times. With multiple markers, a combined AUC-over-time plot is available.
  • Selected time: shows the ROC curve and cut-off-specific results at one selected time.

Time-dependent outputs include AUC(t), threshold, IPCW-adjusted sensitivity, specificity, PPV, NPV, and accuracy. With multiple markers, pairwise AUC comparisons across time can also be requested, with optional multiplicity-adjusted P values.

8. Understanding the main results
AUC
Area under the ROC curve. A value of 0.5 corresponds to chance-level discrimination; values closer to 1 indicate stronger discrimination under the analysed direction.
Threshold
The selected cut-off value. Always read it together with the displayed classification rule because the positive direction can be above or below the threshold.
Sensitivity
Proportion of positive observations correctly classified as positive.
Specificity
Proportion of negative observations correctly classified as negative.
PPV
Positive predictive value: proportion of observations classified as positive that are actually positive. PPV depends on the prevalence of the positive outcome in the analysed dataset.
NPV
Negative predictive value: proportion of observations classified as negative that are actually negative. NPV also depends on outcome prevalence.
Accuracy
Proportion of all analysed observations classified correctly at the selected threshold.
HR
Hazard ratio from Cox regression. The direction of the displayed contrast determines which group is in the numerator; read the contrast label together with the HR and 95% CI.
Log-rank P
Tests whether the Kaplan-Meier survival functions differ between the compared groups.
BH-FDR
Benjamini-Hochberg false discovery rate adjustment reported for multiple candidate cut-offs in the automatic survival cut-off scan.
Statistical significance and predictive usefulness are not interchangeable. A useful cut-off should be considered together with effect size, confidence intervals, discrimination, group sizes, study design, and validation.
9. Exporting results

Download controls are provided next to the relevant plots and tables. Depending on the analysis, exports can include PNG figures, CSV tables, and Excel workbooks containing summary results.

Examples include ROC cut-off summaries, all evaluated thresholds, survival results, survival plot data, automatic cut-off scans, time-dependent AUC tables, selected-time summaries, ROC coordinates, and multiclass summary tables.

Exported statistical results correspond to the current completed analysis run. If the source data or filters are changed, run the analysis again before exporting updated results.
10. Frequently asked questions

Why is the final N smaller than the filtered dataset?

Analysis-specific eligibility is applied after the general filters. Missing or invalid marker, status, time, or event values can therefore reduce the final valid N.

Why does the threshold classify values below the cut-off as positive?

The marker may have an inverse relationship with the positive outcome. Binary ROC uses automatic ROC direction, so the classification rule shown in the results defines the correct interpretation.

Why do different cut-off methods give different thresholds?

They optimize different objectives. Youden balances sensitivity and specificity, Closest to (0,1) minimizes distance from the ideal ROC point, while Maximizing targets one selected diagnostic metric.

Why do PPV and NPV change between datasets even when sensitivity and specificity are similar?

PPV and NPV depend on the prevalence of the positive outcome. A cohort with a different prevalence can therefore produce different predictive values.

Why does an automatic survival cut-off differ from the median?

The median is a predefined distribution-based split. Automatic selection searches candidate cut-offs between Q1 and Q3 and selects the candidate with the smallest Cox score-test P value.

Why is median survival not shown?

A Kaplan-Meier median cannot be estimated if the survival curve does not fall to 0.50. If both groups do not have estimable medians, OptimalCutoff reports the time to 75% survival for both groups instead.

Why does time-dependent AUC change with follow-up time?

The case/control definition changes with time in cumulative/dynamic ROC analysis, and censoring is handled at each evaluation time. A marker can therefore discriminate well at one horizon and less well at another.

Can I use the cut-off found in this dataset as a validated clinical threshold?

A cut-off identified and evaluated in the same dataset is a development result. Whenever possible, lock the threshold and classification rule and evaluate them without modification in an independent validation cohort before making clinical claims.

11. Version & software

Version history

Version Release date Notes
1.0 2026.08.29 Public release.

Runtime software environment

The values below are read from the R session running OptimalCutoff, so they document the software environment actually used for the current deployment.

12. Disclaimer

OptimalCutoff is intended for statistical analysis and research use. Results and selected cutoffs should be interpreted in the context of the study design, population, endpoint definition, uncertainty, and potential overfitting. Cutoffs intended for clinical use should be locked and independently validated before clinical implementation.