Checks for autocorrelation in target variable or in residuals

check_residuals_autocorrelation(model, method = "pearson")

Arguments

model

an object of the class `modelAudit`

method

will be passed to the cor.test functions

Value

autocorrelation between target variable and between residuals

Examples

library(car) lm_model <- lm(prestige ~ education + women + income, data = Prestige) lm_au <- audit(lm_model, data = Prestige, y = Prestige$prestige) check_residuals_autocorrelation(lm_au)
#> ----------------------------------------------- #> Checks for autocorrelation #> ----------------------------------------------- #> Model name: lm #> Autocorrelation in target: +0.69 *** #> Autocorrelation in residuals: +0.15 .