% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/modelling.R
\name{weightedAverageModel}
\alias{weightedAverageModel}
\title{BIC-Weighted Model Averaging Across Consistent Candidate Models}
\usage{
weightedAverageModel(results, data, raw, weights = NULL, deltaBIC = 10)
}
\arguments{
\item{results}{A (screened) \code{summary.regsubsets} object, including a
\code{consistent} flag per row.}

\item{data}{The preprocessed norm data.}

\item{raw}{Name of the raw score variable.}

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

\item{deltaBIC}{Only models within this BIC distance of the best candidate
are averaged (default 10; Burnham & Anderson, 2002).}
}
\value{
An \code{lm}-type object with averaged coefficients over the union of
  the candidate terms; \code{fitted.values} and \code{residuals} are updated
  accordingly.
}
\description{
Computes a weighted average of the regression coefficients across the
consistency-screened candidate models returned by \code{regsubsets} and
\code{screenSubset}. Weights are information-theoretic model weights
\eqn{w_j \propto exp(-\Delta BIC_j / 2)}, restricted to models within
\code{deltaBIC} of the best model. Each candidate is refitted on the
complete sample via (weighted) least squares; coefficients of terms not
included in a candidate are treated as zero.
}
\details{
Because all candidates passed the monotonicity screening (same direction),
and the averaging weights are positive and sum to one, the averaged model is
itself monotone and thus consistent. In contrast to averaging coefficients
over subsamples (deprecated \code{subsample_lm}), this approach targets the
actual source of variance - model selection - while each component estimate
remains a full-sample least squares fit.
}
\references{
Burnham, K. P., & Anderson, D. R. (2002). Model Selection and
  Multimodel Inference. Springer.
}
\seealso{
Other model:
\code{\link[=bestModel]{bestModel()}},
\code{\link[=checkConsistency]{checkConsistency()}},
\code{\link[=cnorm.cv]{cnorm.cv()}},
\code{\link[=derive]{derive()}},
\code{\link[=modelSummary]{modelSummary()}},
\code{\link[=print.cnorm]{print.cnorm()}},
\code{\link[=printSubset]{printSubset()}},
\code{\link[=rangeCheck]{rangeCheck()}},
\code{\link[=regressionFunction]{regressionFunction()}},
\code{\link[=summary.cnorm]{summary.cnorm()}}
}
\concept{model}
