validateParameters: Validate and prepare common diagnostic-combination parameters

View source: R/validator.R

validateParametersR Documentation

Validate and prepare common diagnostic-combination parameters

Description

Internal helper used to validate and prepare parameters shared by diagnostic combination functions. It checks marker data, disease status, event class, ROC direction, confidence level, cutoff method, and display options. It also converts markers to a data frame and status to a factor when needed.

Usage

validateParameters(
  markers = NULL,
  status = NULL,
  event = NULL,
  method = NULL,
  direction = c("<", ">"),
  conf.level = 0.95,
  cutoff.method = c("CB", "MCT", "MinValueSp", "MinValueSe", "ValueSp", "ValueSe",
    "MinValueSpSe", "MaxSp", "MaxSe", "MaxSpSe", "MaxProdSpSe", "ROC01", "SpEqualSe",
    "Youden", "MaxEfficiency", "Minimax", "MaxDOR", "MaxKappa", "MinValueNPV",
    "MinValuePPV", "ValueNPV", "ValuePPV", "MinValueNPVPPV", "PROC01", "NPVEqualPPV",
    "MaxNPVPPV", "MaxSumNPVPPV", "MaxProdNPVPPV", "ValueDLR.Negative",
    "ValueDLR.Positive", "MinPvalue", "ObservedPrev", "MeanPrev", "PrevalenceMatching"),
  show.plot = TRUE,
  show.result = FALSE
)

Arguments

markers

A numeric data frame or matrix with exactly two columns. Each column should contain one diagnostic marker.

status

A factor or vector indicating the true disease status. It must contain exactly two non-missing classes, and both classes must be represented in the data.

event

A single non-missing value indicating which level of status should be treated as the positive/event class.

method

A character string specifying the model or combination method. This argument is returned unchanged; method-specific validation should be handled by the calling function.

direction

A character string specifying the ROC direction. Possible values are "<" and ">".

conf.level

A numeric value between 0 and 1 specifying the confidence level used for ROC-related summaries.

cutoff.method

A character string specifying the cutoff selection method used for ROC analysis.

show.plot

A logical value indicating whether the ROC plot should be displayed.

show.result

A logical value indicating whether results should be printed to the console.

Value

A list containing the validated and prepared values: markers, status, event, method, direction, conf.level, cutoff.method, show.plot, and show.result.


dtComb documentation built on June 24, 2026, 5:08 p.m.