autoselect.shash: Automatic model selection for SinH-ArcSinH continuous norming...

View source: R/shash.R

autoselect.shashR Documentation

Automatic model selection for SinH-ArcSinH continuous norming via BIC

Description

Selects the polynomial degrees for the four components of a cnorm.shash model (\mu, \sigma, \epsilon, \delta) by minimizing BIC over a full grid.

Usage

autoselect.shash(
  age,
  score,
  weights = NULL,
  max_mu = 4,
  max_sigma = 3,
  max_epsilon = 3,
  max_delta = 1,
  min_mu = 1,
  min_sigma = 1,
  min_epsilon = 1,
  min_delta = 0,
  delta = 1,
  control = NULL,
  scale = "T",
  parallel = TRUE,
  n_cores = NULL,
  plot = TRUE,
  verbose = TRUE
)

Arguments

age, score

Numeric vectors of predictor and response values.

weights

Optional numeric vector of observation weights.

max_mu, max_sigma, max_epsilon, max_delta

Maximum polynomial degrees for the four shash parameters. Defaults: 4, 3, 3, 1.

min_mu, min_sigma, min_epsilon

Minimum polynomial degrees (default 1).

min_delta

Minimum degree for \delta. 0 (default) means the fixed-delta variant is included in the search.

delta

Value of \delta used whenever the candidate uses delta_degree = 0 (i.e. fixed delta). Default 1.

control

Optional control list passed to optim.

scale

Norm scale (default "T").

parallel

Logical; attempt parallel execution. Default TRUE.

n_cores

Number of cores. Defaults to all logical cores.

plot

Logical; plot the selected model. Default TRUE.

verbose

Logical; print progress. Default TRUE.

Details

A degree of 0 for \delta is interpreted as a **fixed** \delta (passed to cnorm.shash as delta_degree = NULL) with value taken from the delta argument. This allows the grid search to choose between a fixed and a varying tail-weight model.

Parallel execution is attempted by default. If the workers cannot access the cNORM namespace, the function transparently falls back to sequential execution.

Value

The selected fitted cnormShash model with an additional element $selection containing:

  • evaluated: data frame of every combination tried, sorted by BIC.

  • selected: list with the chosen degrees and BIC.

See Also

cnorm.shash, autoselect.betabinomial

Examples

## Not run: 
m <- autoselect.shash(elfe$group, elfe$raw)
m$selection$evaluated
summary(m, age = elfe$group, score = elfe$raw)

## End(Not run)


cNORM documentation built on July 13, 2026, 5:08 p.m.