validateLinComb: Validate parameters specific to 'linComb'

View source: R/validator.R

validateLinCombR Documentation

Validate parameters specific to linComb

Description

Internal helper used by linComb to validate linear-combination-specific arguments. It checks the selected combination method, resampling method, standardization method, and method-specific standardization requirements. It also adjusts nrepeats when resample = "cv" and forces the required standardization for selected methods.

Usage

validateLinComb(
  method = c("scoring", "SL", "logistic", "minmax", "PT", "PCL", "minimax", "TS"),
  resample = c("none", "cv", "repeatedcv", "boot"),
  nfolds = 5,
  nrepeats = 3,
  niters = 10,
  standardize = c("none", "min_max_scale", "zScore", "tScore", "scale_mean_to_one",
    "scale_sd_to_one"),
  ndigits = 0
)

Arguments

method

A character string specifying the linear combination method. Available methods are "scoring", "SL", "logistic", "minmax", "PT", "PCL", "minimax", and "TS".

resample

A character string specifying the resampling method. Available options are "none", "cv", "repeatedcv", and "boot".

nfolds

A positive integer indicating the number of folds for cross-validation-based resampling methods. Default is 5.

nrepeats

A positive integer indicating the number of repeats for "repeatedcv". If resample = "cv", this is set to 1. Default is 3.

niters

A positive integer indicating the number of bootstrap resampling iterations when resample = "boot". Default is 10.

standardize

A character string specifying the standardization method. Available options are "none", "min_max_scale", "zScore", "tScore", "scale_mean_to_one", and "scale_sd_to_one".

ndigits

A non-negative integer indicating the number of decimal places used for rounding coefficients in the "scoring" method. Default is 0.

Details

The "minmax" and "PCL" methods require standardize = "min_max_scale". If another standardization method is supplied, it is replaced with "min_max_scale" and a warning is issued.

The "PT" method requires standardize = "zScore". If another standardization method is supplied, it is replaced with "zScore" and a warning is issued.

Value

A list containing the validated and prepared values: method, resample, nfolds, nrepeats, niters, standardize, and ndigits.


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