autoselect.betabinomial: Automatic model selection for beta-binomial continuous...

autoselect.betabinomialR Documentation

Automatic model selection for beta-binomial continuous norming via BIC

Description

Selects polynomial degrees for the two components of a beta-binomial model (\alpha/\beta when mode = 2 or \mu/\sigma when mode = 1) by minimizing BIC over the full grid of degree combinations.

Usage

autoselect.betabinomial(
  age,
  score,
  n = NULL,
  weights = NULL,
  mode = 2,
  max_alpha = 4,
  max_beta = 4,
  min_alpha = 1,
  min_beta = 1,
  control = NULL,
  scale = "T",
  parallel = TRUE,
  n_cores = NULL,
  plot = TRUE,
  verbose = TRUE
)

Arguments

age, score

Numeric vectors of predictor and response values.

n

Maximum score. Defaults to max(score).

weights

Optional numeric vector of weights.

mode

1 for \mu/\sigma, 2 for direct \alpha/\beta (default).

max_alpha, max_beta

Maximum polynomial degrees. Default 4.

min_alpha, min_beta

Minimum polynomial degrees. 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

Parallel execution is attempted by default. If the workers cannot access the cNORM namespace (e.g. during devtools::load_all()), the function transparently falls back to sequential execution.

Value

The selected fitted model, with an additional element selection containing the evaluation table and selection details.


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