% 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 = "bartlett", ...)

\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
\dontshow{if (insight::check_if_installed("see", minimum_version = "0.9.1", quietly = TRUE)) withAutoprint(\{ # examplesIf}
result <- check_homogeneity(model)
plot(result)
\dontshow{\}) # examplesIf}
}
\seealso{
Other functions to check model assumptions and and assess model quality:
\code{\link[=check_autocorrelation]{check_autocorrelation()}},
\code{\link[=check_collinearity]{check_collinearity()}},
\code{\link[=check_convergence]{check_convergence()}},
\code{\link[=check_heteroscedasticity]{check_heteroscedasticity()}},
\code{\link[=check_model]{check_model()}},
\code{\link[=check_outliers]{check_outliers()}},
\code{\link[=check_overdispersion]{check_overdispersion()}},
\code{\link[=check_predictions]{check_predictions()}},
\code{\link[=check_singularity]{check_singularity()}},
\code{\link[=check_zeroinflation]{check_zeroinflation()}}
}
\concept{functions to check model assumptions and and assess model quality}
