shapeselect_control: Control parameters for 'shapeselect()'

View source: R/shapeselect.R

shapeselect_controlR Documentation

Control parameters for shapeselect()

Description

Creates a list of parameters used by shapeselect() to control basis construction, information-criterion calibration, simulation settings, parallel computing etc.

Usage

shapeselect_control(
  knots_lst = NULL,
  boundary.knots = NULL,
  space = "E",
  nsim = 200,
  nfolds = 5,
  eps = 1e-08,
  pnt = TRUE,
  multicore = getOption("cgam.parallel"),
  a = NULL,
  maxedf = FALSE,
  add_edfu = 0,
  add_kts = NULL,
  shrinketa = FALSE,
  catnrep = FALSE,
  standardize = TRUE,
  center = TRUE,
  verbose = FALSE,
  set4 = TRUE
)

Arguments

knots_lst

Optional list specifying knots for spline basis functions, one element per predictor. Use NULL to let shapeselect() (and its helper routines) choose defaults.

boundary.knots

Optional list specifiying knots for numeric predictors.

space

Character string indicating the knots being equally spaced for spline bases in underlying fitting routines (e.g., "E").

nsim

Integer; number of simulations used when estimating mean degrees of freedom terms used in variable and shape selection criteria CBIC.

nfolds

Integer; number of folds used for cross-validation when type = "classo" (shrinkage selection). It is not in use for now.

eps

Numeric tolerance used for detecting near-zero signal.

pnt

Logical; whether to use penalized spline estimator.

multicore

Logical/integer; parallel setting passed to shapeselect() via the parallel control entry. Defaults to getOption("cgam.parallel").

a

Optional numeric; calibration constant used in the modified CBIC penalty term. If NULL, shapeselect() chooses a value based on n, p, and the implied total number of basis functions.

maxedf

Logical; if TRUE, enforce an effective degrees of freedom cap in internal forward-step routines (as implemented).

add_edfu

Numeric; optional additive adjustment to the unconstrained EDF used in the information criterion calculations.

add_kts

Integer; optional adjustment to the number of knots used in spline bases. If NULL, shapeselect() chooses a default depending on pnt.

shrinketa

Logical; if TRUE and type = "classo", shrink fitted component contributions by the selected shrinkage parameters. It is not in use for now.

catnrep

Logical; if TRUE, print the iteration counter during the selection path.

standardize

Logical; if TRUE, standardize numeric predictors by their standard deviations.

center

Logical; if TRUE, center numeric predictors when scaling them.

verbose

Logical; if TRUE, print the model-path tracking matrix as the algorithm runs.

set4

Logical; optional flag passed through to internal routines used to restrict or modify the candidate shape set to be increasing, decreasing, convex and concave; if false, then combinations of monotonicity and convexity will be added

Value

A named list suitable for the control argument of shapeselect().

Examples

ctrl <- shapeselect_control(nsim = 100, nfolds = 10, verbose = TRUE)
ctrl


cgam documentation built on Oct. 20, 2026, 5:08 p.m.