% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/betaBinomial.R
\name{autoselect.betabinomial}
\alias{autoselect.betabinomial}
\title{Automatic model selection for beta-binomial continuous norming via BIC}
\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{
\item{age, score}{Numeric vectors of predictor and response values.}

\item{n}{Maximum score. Defaults to \code{max(score)}.}

\item{weights}{Optional numeric vector of weights.}

\item{mode}{1 for \eqn{\mu}/\eqn{\sigma}, 2 for direct
\eqn{\alpha}/\eqn{\beta} (default).}

\item{max_alpha, max_beta}{Maximum polynomial degrees. Default 4.}

\item{min_alpha, min_beta}{Minimum polynomial degrees. Default 1.}

\item{control}{Optional control list passed to \code{\link[stats]{optim}}.}

\item{scale}{Norm scale (default \code{"T"}).}

\item{parallel}{Logical; attempt parallel execution. Default \code{TRUE}.}

\item{n_cores}{Number of cores. Defaults to all logical cores.}

\item{plot}{Logical; plot the selected model. Default \code{TRUE}.}

\item{verbose}{Logical; print progress. Default \code{TRUE}.}
}
\value{
The selected fitted model, with an additional element
  \code{selection} containing the evaluation table and selection details.
}
\description{
Selects polynomial degrees for the two components of a beta-binomial model
(\eqn{\alpha}/\eqn{\beta} when \code{mode = 2} or \eqn{\mu}/\eqn{\sigma}
when \code{mode = 1}) by minimizing BIC over the full grid of degree
combinations.
}
\details{
Parallel execution is attempted by default. If the workers cannot access
the \pkg{cNORM} namespace (e.g. during \code{devtools::load_all()}), the
function transparently falls back to sequential execution.
}
