% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fit_utils.R
\name{validate_model_outcome}
\alias{validate_model_outcome}
\title{Validate model type matches outcome specification}
\usage{
validate_model_outcome(
  outcome,
  model_type,
  family = NULL,
  data = NULL,
  auto_correct = TRUE
)
}
\arguments{
\item{outcome}{Character string outcome specification (may include Surv()).}

\item{model_type}{Character string specified model type.}

\item{family}{GLM family object, function, or string if applicable.}

\item{data}{Data frame or data.table for outcome type detection.}

\item{auto_correct}{Logical whether to auto-correct fixable mismatches.}
}
\value{
List with model_type, family, messages, auto_corrected flag.
}
\description{
Ensures consistency between the specified model type, outcome variable type,
and GLM family (if applicable). Detects common mismatches like using survival
outcomes with non-survival models or binary outcomes with linear models.
Can auto-correct fixable issues or raise informative errors.
}
\keyword{internal}
