% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/m2dt_utils.R
\name{get_model_xlevels}
\alias{get_model_xlevels}
\title{Get factor levels from model (works with S3 and S4)}
\usage{
get_model_xlevels(model)
}
\arguments{
\item{model}{Fitted model object (S3 or S4).}
}
\value{
Named list of factor levels, or \code{NULL} if no factors present.
}
\description{
Extracts factor level information from fitted model objects. Handles both
S3 models (glm, lm, coxph) via xlevels slot and S4 models (lme4) via
the model frame.
}
\keyword{internal}
