% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pmm3_dispatch.R
\name{pmm_dispatch}
\alias{pmm_dispatch}
\title{Automatic PMM method selection}
\usage{
pmm_dispatch(
  residuals,
  symmetry_threshold = 0.3,
  kurtosis_threshold = -0.7,
  g2_threshold = 0.95,
  verbose = TRUE
)
}
\arguments{
\item{residuals}{numeric vector of OLS residuals}

\item{symmetry_threshold}{numeric: |gamma3| threshold for symmetry (default 0.3)}

\item{kurtosis_threshold}{numeric: gamma4 threshold for PMM3 (default -0.7)}

\item{g2_threshold}{numeric: minimum g2 improvement to justify PMM2 (default 0.95)}

\item{verbose}{logical: print decision reasoning (default TRUE)}
}
\value{
An object of S3 class \code{"PMMdispatch"}: a list with
components accessible via \code{$} and a dedicated \code{print}
method. Components:
\item{method}{Character: "OLS", "PMM2", or "PMM3"}
\item{gamma3}{Sample skewness}
\item{gamma4}{Sample excess kurtosis}
\item{gamma6}{Sample 6th cumulant coefficient}
\item{g2}{PMM2 efficiency factor}
\item{g3}{PMM3 efficiency factor}
\item{g_selected}{Efficiency factor for chosen method}
\item{improvement_pct}{Expected variance reduction percentage}
\item{reasoning}{Human-readable decision explanation}
\item{n}{Sample size}
}
\description{
Analyses OLS residual cumulants to recommend the best estimation method:
OLS (Gaussian errors), PMM2 (asymmetric errors), or PMM3 (symmetric
platykurtic errors).
}
\examples{
set.seed(42)
x <- rnorm(200); eps <- runif(200, -1, 1)
y <- 1 + 2 * x + eps
fit_ols <- lm(y ~ x)
pmm_dispatch(residuals(fit_ols))

}
