% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/diagnostics.R
\name{tl_influence_measures}
\alias{tl_influence_measures}
\title{Calculate influence measures for a linear model}
\usage{
tl_influence_measures(
  model,
  threshold_cook = NULL,
  threshold_leverage = NULL,
  threshold_dffits = NULL
)
}
\arguments{
\item{model}{A tidylearn model object}

\item{threshold_cook}{Cook's distance threshold (default: 4/n)}

\item{threshold_leverage}{Leverage threshold (default: 2*(p+1)/n)}

\item{threshold_dffits}{DFFITS threshold (default: 2*sqrt((p+1)/n))}
}
\value{
A data frame with one row per observation containing influence
measures: \code{cooks_distance}, \code{leverage}, \code{dffits},
\code{std_residual}, \code{stud_residual}, boolean flags for each
threshold (\code{is_cook_influential}, \code{is_leverage_influential},
\code{is_dffits_influential}, \code{is_outlier}), per-coefficient
\code{dfbetas_*} columns, and an overall \code{is_influential} flag.
Threshold values are stored as attributes.
}
\description{
Calculate influence measures for a linear model
}
\examples{
\donttest{
model <- tl_model(mtcars, mpg ~ wt + hp, method = "linear")
tl_influence_measures(model)
}
}
