This function is only suitable to analyze residuals of ANOVA models. It must not be used to analyze residuals from regression or ANCOVA models.
plotResiduals(model)residual plots suitable for residual analysis of data from design experiments.
library(planex)
library(tidyverse)
data(saquinhos)
saquinhos <- mutate(saquinhos,
concentracao = as.factor(concentracao)
)
mod <- aov(resistencia ~ concentracao, data = saquinhos)
plotResiduals(mod)
#> Warning: `fortify(<lm>)` was deprecated in ggplot2 4.0.0.
#> ℹ Please use `broom::augment(<lm>)` instead.
#> ℹ The deprecated feature was likely used in the ggplot2 package.
#> Please report the issue at <https://github.com/tidyverse/ggplot2/issues>.