Density of model residuals.

plotResidualDensity(object, ..., split.var = TRUE, variable = NULL)

Arguments

object

An object of class ModelAudit.

...

Other modelAudit objects to be plotted together.

split.var

Logical. Indicates whenever plot should be splitted by variable.

variable

variable name o split. Optional. Should be provided only for modelAudit object.

Value

ggplot object

See also

Examples

library(car) lm_model <- lm(prestige~education + women + income, data = Prestige) lm_au <- audit(lm_model, data = Prestige, y = Prestige$prestige) plotResidualDensity(lm_au)
library(randomForest) rf_model <- randomForest(prestige~education + women + income, data = Prestige) rf_au <- audit(rf_model, data = Prestige, y = Prestige$prestige) plotResidualDensity(lm_au, rf_au)