% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/check_homogeneity.R
\name{check_homogeneity}
\alias{check_homogeneity}
\alias{check_homogeneity.afex_aov}
\title{Check model for homogeneity of variances}
\usage{
check_homogeneity(x, method = c("bartlett", "fligner", "levene", "auto"), ...)

\method{check_homogeneity}{afex_aov}(x, method = "levene", ...)
}
\arguments{
\item{x}{A linear model or an ANOVA object.}

\item{method}{Name of the method (underlying test) that should be performed
to check the homogeneity of variances. May either be \code{"levene"} for
Levene's Test for Homogeneity of Variance, \code{"bartlett"} for the
Bartlett test (assuming normal distributed samples or groups),
\code{"fligner"} for the Fligner-Killeen test (rank-based, non-parametric
test), or \code{"auto"}. In the latter case, Bartlett test is used if the
model response is normal distributed, else Fligner-Killeen test is used.}

\item{...}{Arguments passed down to \code{car::leveneTest()}.}
}
\value{
Invisibly returns the p-value of the test statistics. A p-value <
0.05 indicates a significant difference in the variance between the groups.
}
\description{
Check model for homogeneity of variances between groups described
by independent variables in a model.
}
\note{
There is also a \href{https://easystats.github.io/see/articles/performance.html}{\code{plot()}-method} implemented in the \href{https://easystats.github.io/see/}{\pkg{see}-package}.
}
\examples{
model <<- lm(len ~ supp + dose, data = ToothGrowth)
check_homogeneity(model)

# plot results
if (require("see")) {
  result <- check_homogeneity(model)
  plot(result)
}
}
