Performs a battery of statistical tests on model residuals to check for autocorrelation, heteroscedasticity, and normality.
residual_diagnostics(
residuals,
data = NULL,
predictors = NULL,
max_lag = 10,
plot = TRUE
)A list of test results with class "residual_diagnostics"
Numeric vector of residuals (or model object)
Optional data frame for conditional tests
Variable names for heteroscedasticity tests
Maximum lag for autocorrelation tests
Produce diagnostic plots?