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.
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
)The selected fitted model, with an additional element
selection containing the evaluation table and selection details.
Numeric vectors of predictor and response values.
Maximum score. Defaults to max(score).
Optional numeric vector of weights.
1 for \(\mu\)/\(\sigma\), 2 for direct \(\alpha\)/\(\beta\) (default).
Maximum polynomial degrees. Default 4.
Minimum polynomial degrees. Default 1.
Optional control list passed to optim.
Norm scale (default "T").
Logical; attempt parallel execution. Default TRUE.
Number of cores. Defaults to all logical cores.
Logical; plot the selected model. Default TRUE.
Logical; print progress. Default TRUE.
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.