validateNonlinComb: Validate parameters specific to 'nonlinComb'

View source: R/validator.R

validateNonlinCombR Documentation

Validate parameters specific to nonlinComb

Description

Internal helper used by nonlinComb to validate nonlinear-combination-specific arguments. It checks the selected nonlinear combination method, polynomial degrees, spline/GAM degrees of freedom, resampling method and related resampling parameters, standardization method, interaction option, and elastic net mixing parameter.

Usage

validateNonlinComb(
  method = c("polyreg", "ridgereg", "lassoreg", "elasticreg", "splines", "sgam", "nsgam"),
  degree1 = 3,
  degree2 = 3,
  df1 = 4,
  df2 = 4,
  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"),
  include.interact = FALSE,
  alpha = 0.5
)

Arguments

method

A character string specifying the nonlinear combination method. Available methods are "polyreg", "ridgereg", "lassoreg", "elasticreg", "splines", "sgam", and "nsgam".

degree1

A positive integer specifying the polynomial degree for the first marker in polynomial-based methods. Default is 3.

degree2

A positive integer specifying the polynomial degree for the second marker in polynomial-based methods. Default is 3.

df1

A positive integer specifying the degrees of freedom for the first marker in spline/GAM-based methods. Default is 4.

df2

A positive integer specifying the degrees of freedom for the second marker in spline/GAM-based methods. Default is 4.

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".

include.interact

A logical value indicating whether the interaction term between the two markers should be included in polynomial-based methods. Default is FALSE.

alpha

A numeric value between 0 and 1 specifying the elastic net mixing parameter when method = "elasticreg". Default is 0.5.

Value

A list containing the validated and prepared values: method, degree1, degree2, df1, df2, resample, nfolds, nrepeats, niters, standardize, include.interact, and alpha.


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