Check model for violation of sphericity

check_sphericity(x, ...)

Arguments

x

A model object.

...

Arguments passed to car::Anova.

Value

Invisibly returns the p-values of the test statistics. A p-value < 0.05 indicates a violation of sphericity.

Examples

if (require("car")) {
  soils.mod <- lm(
    cbind(pH, N, Dens, P, Ca, Mg, K, Na, Conduc) ~ Block + Contour * Depth,
    data = Soils
  )

  check_sphericity(Manova(soils.mod))
}
#> Loading required package: car
#> Loading required package: carData
#> 
#> Attaching package: ‘car’
#> The following object is masked from ‘package:dplyr’:
#> 
#>     recode
#> The following object is masked from ‘package:psych’:
#> 
#>     logit
#> Warning: no non-missing arguments to min; returning Inf
#> OK: Data seems to be spherical (p > .999).
#>