% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/agent-sensitivity.R
\name{tr_sensitivity}
\alias{tr_sensitivity}
\title{Run an automated sensitivity analysis battery}
\usage{
tr_sensitivity(data, model, subgroup_col = NULL, outlier_sd = 3)
}
\arguments{
\item{data}{The original (pre-imputation) data frame, containing the
same predictors and outcome used in \code{model}.}

\item{model}{A fitted \code{triageR_model} object from \code{tr_fit()}.}

\item{subgroup_col}{Optional character. Name of a categorical column
(e.g. "sex") to check subgroup consistency across.}

\item{outlier_sd}{Numeric. Number of standard deviations beyond which a
numeric predictor value is considered an outlier and excluded in the
outlier-robustness check. Defaults to 3.}
}
\value{
A \code{triageR_sensitivity} object (list) with a comparison tibble
of metrics across all sensitivity scenarios.
}
\description{
Re-fits a clinical prediction model under several robustness checks,
complete-case vs imputed data, outlier exclusion, and subgroup
consistency, and compares performance metrics across them.
}
\examples{
\dontrun{
tr_sensitivity(data, model, subgroup_col = "sex")
}
}
