\name{statwitness}
\alias{statwitness}
\title{Generate a Behavioral Validation Certificate}
\usage{
statwitness(
  formula,
  data,
  focus = NULL,
  family = NULL,
  weights = NULL,
  method = "auto",
  engine = NULL,
  control = NULL,
  conf_level = 0.95,
  tolerance = 1e-07,
  seed = 20260712,
  include = NULL,
  exclude = NULL,
  audit_level = c("standard", "core", "thorough")
)
}
\arguments{
\item{formula}{A model formula. Random-effect terms using \code{|} and survival responses using \code{Surv()} are supported when their suggested packages are installed.}
\item{data}{A data frame containing all analysis variables.}
\item{focus}{An optional coefficient, predictor, or omnibus term such as \code{"criterion:model"}.}
\item{family}{An optional GLM or GLMM family.}
\item{weights}{Optional analysis weights or the name of a weight column.}
\item{method}{One of \code{"auto"}, \code{"lm"}, \code{"aov"}, \code{"glm"}, \code{"lmer"}, \code{"glmer"}, \code{"glmmTMB"}, \code{"coxph"}, or \code{"survreg"}.}
\item{engine}{An optional custom fitting function.}
\item{control}{An optional model-specific control object.}
\item{conf_level}{Confidence level for coefficient intervals.}
\item{tolerance}{Relative numerical tolerance.}
\item{seed}{Seed for deterministic perturbations.}
\item{include}{Optional test identifiers to retain.}
\item{exclude}{Optional test identifiers to omit.}
\item{audit_level}{Audit breadth: \code{"core"}, \code{"standard"}, or \code{"thorough"}.}
}
\value{An object of class \code{statwitness_audit}.}
\description{
Fits a supported model, chooses mathematically applicable behavioral tests,
applies controlled transformations, and checks whether the analysis responds
as expected.
}
\examples{
dat <- transform(mtcars, transmission = factor(am))
audit <- statwitness(mpg ~ transmission + wt, data = dat, focus = "transmission")
print(audit)
}
