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)

Arguments

model

an object of the class lm or aov.

Value

residual plots suitable for residual analysis of data from design experiments.

Examples

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>.