View source: R/check_homogeneity.R
| check_homogeneity | R Documentation |
Check model for homogeneity of variances between groups described by independent variables in a model.
check_homogeneity(x, method = "bartlett", ...)
## S3 method for class 'afex_aov'
check_homogeneity(x, method = "levene", ...)
x |
A linear model or an ANOVA object. |
method |
Name of the method (underlying test) that should be performed
to check the homogeneity of variances. May either be |
... |
Arguments passed down to |
Invisibly returns the p-value of the test statistics. A p-value < 0.05 indicates a significant difference in the variance between the groups.
There is also a plot()-method
implemented in the see-package.
Other functions to check model assumptions and and assess model quality:
check_autocorrelation(),
check_collinearity(),
check_convergence(),
check_heteroscedasticity(),
check_model(),
check_outliers(),
check_overdispersion(),
check_predictions(),
check_singularity(),
check_zeroinflation()
model <<- lm(len ~ supp + dose, data = ToothGrowth)
check_homogeneity(model)
# plot results
result <- check_homogeneity(model)
plot(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.