R/diagnostics.R
compute_residuals.Rd
Returns raw / standardised / externally studentised residuals along with normality, heteroskedasticity (Breusch-Pagan), and autocorrelation (Durbin-Watson) tests. Optionally also returns deviance and Pearson residuals for logistic / Poisson GLMs.
compute_residuals(y, y_hat, X, model_type = "linear")
Observed response.
Fitted values.
Design matrix.
"linear", "logistic", or "poisson".
"linear"
"logistic"
"poisson"
A morie_residual_diagnostics list.
morie_residual_diagnostics