Covariance structure: Box's M and two sphericities
Test whether groups share a covariance matrix, untangle the two different tests called "sphericity", and use each one for what it can do.
What runs in CodeSplash
- STAT158Box M test Runs in CodeSplash
- STAT159Bartlett sphericity test for correlations Runs in CodeSplash
- STAT160Mauchly sphericity test Runs in CodeSplash
- Box's M test of equal covariance matrices Verified in Python and R
- Exploratory factor analysis Verified in Python and R
- Repeated-measures ANOVA (one within factor) Verified in Python and R
You will be able to
- Read Box's M and explain why it is judged at a strict level
- Distinguish Bartlett's sphericity from Mauchly's sphericity
- Say what to do when each test rejects
Read first
Predict Box's M on non-normal data
PredictPredict first
Box's M uses the same log-determinant approach as Bartlett's test for variances. What happens if the data have heavy tails but the true covariance matrices are equal?
Reveal
It rejects far too often, because it is also sensitive to non-normality. This is why it is read at α = 0.001 rather than 0.05, and why a rejection is a reason to look, not a verdict.
Read a rejection
In the appBox's M = 146.66, χ²(20) = 140.94, p < .001
- M
- 146.66
- χ²
- 140.94
- df
- 20
- F
- 7.045
- F df2
- 77566.75
- p
- < .001
Plots
View data
| Species | Sepal.Length | Sepal.Width |
|---|---|---|
| setosa | 5.100 | 3.500 |
| setosa | 4.900 | 3 |
| setosa | 4.700 | 3.200 |
| setosa | 4.600 | 3.100 |
| setosa | 5 | 3.600 |
| setosa | 5.400 | 3.900 |
| setosa | 4.600 | 3.400 |
| setosa | 5 | 3.400 |
| setosa | 4.400 | 2.900 |
| setosa | 4.900 | 3.100 |
| setosa | 5.400 | 3.700 |
| setosa | 4.800 | 3.400 |
| setosa | 4.800 | 3 |
| setosa | 4.300 | 3 |
| setosa | 5.800 | 4 |
| setosa | 5.700 | 4.400 |
| setosa | 5.400 | 3.900 |
| setosa | 5.100 | 3.500 |
| setosa | 5.700 | 3.800 |
| setosa | 5.100 | 3.800 |
| setosa | 5.400 | 3.400 |
| setosa | 5.100 | 3.700 |
| setosa | 4.600 | 3.600 |
| setosa | 5.100 | 3.300 |
| setosa | 4.800 | 3.400 |
| setosa | 5 | 3 |
| setosa | 5 | 3.400 |
| setosa | 5.200 | 3.500 |
| setosa | 5.200 | 3.400 |
| setosa | 4.700 | 3.200 |
| setosa | 4.800 | 3.100 |
| setosa | 5.400 | 3.400 |
| setosa | 5.200 | 4.100 |
| setosa | 5.500 | 4.200 |
| setosa | 4.900 | 3.100 |
| setosa | 5 | 3.200 |
| setosa | 5.500 | 3.500 |
| setosa | 4.900 | 3.600 |
| setosa | 4.400 | 3 |
| setosa | 5.100 | 3.400 |
| setosa | 5 | 3.500 |
| setosa | 4.500 | 2.300 |
| setosa | 4.400 | 3.200 |
| setosa | 5 | 3.500 |
| setosa | 5.100 | 3.800 |
| setosa | 4.800 | 3 |
| setosa | 5.100 | 3.800 |
| setosa | 4.600 | 3.200 |
| setosa | 5.300 | 3.700 |
| setosa | 5 | 3.300 |
| versicolor | 7 | 3.200 |
| versicolor | 6.400 | 3.200 |
| versicolor | 6.900 | 3.100 |
| versicolor | 5.500 | 2.300 |
| versicolor | 6.500 | 2.800 |
| versicolor | 5.700 | 2.800 |
| versicolor | 6.300 | 3.300 |
| versicolor | 4.900 | 2.400 |
| versicolor | 6.600 | 2.900 |
| versicolor | 5.200 | 2.700 |
First 60 of 150 rows.
Assumptions
- Multivariate normality within groups — Mardia skewness p = .045, kurtosis z = 3.28, p = .001; Box's M then often rejects because of the tails, not the covariances — read it with care.
- Each group larger than the number of variables — Smallest group: 50 rows for 4 variables.
Log-determinants of the covariance matrices
| Species | n | ln |S| |
|---|---|---|
| setosa | 50 | −13.067 |
| versicolor | 50 | −10.874 |
| virginica | 50 | −8.927 |
| Pooled | 150 | −9.959 |
- Box's M with the χ² approximation (1 − c₁)M, c₁ = 0.03900, and Box's F approximation; conventionally judged at α = 0.001 because it is sensitive to non-normality and large samples (Tabachnick & Fidell 2019).
The exact R script · R R version 4.5.1 (2025-06-13)
# Box's M test of equal covariance matrices
# Generated by CodeSplash Analytics 1.0.0 on 2026-11-09 · method multivariate.box_m 1.0.1 · spec 0f5288dce6992b6b
# Dataset: iris (version 1)
# Runs on its own: outside the app, cs_publish() writes $CS_RESULT_PATH or prints the result JSON.
# %% Setup
library(codesplashr)
# %% Data
df <- as.data.frame(nanoparquet::read_parquet("tests/parity/fixtures/iris.parquet", col_select = c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width", "Species")))
n_input <- nrow(df)
df[["Species"]] <- factor(df[["Species"]], levels = c("setosa", "versicolor", "virginica")) # stored level order
df <- df[stats::complete.cases(df[c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width", "Species")]), , drop = FALSE] # listwise deletion
df[] <- lapply(df, function(x) if (is.factor(x)) droplevels(x) else x)
n_dropped <- n_input - nrow(df)
warnings <- list()
if (n_dropped > 0) {
warnings <- c(warnings, cs_warning("CS_W_ROWS_DROPPED", dropped = n_dropped, total = n_input))
}
if (n_input > 0 && nrow(df) == 0) cs_error("CS_E_NO_ROWS")
cs_check_finite_columns(df, c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width", "Species")) # infinite values stop the run (registry/errors.yaml)
# %% Test
# Box (1949): M = (N − k) ln|S_p| − Σ (n_j − 1) ln|S_j| with χ² and F approximations (heplots::boxM).
variables <- c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width")
g <- "Species"
approximation <- "chisq" # chisq | f
alpha <- 0.001
levels_g <- levels(df[[g]])
k <- length(levels_g)
if (k < 2) cs_error("CS_E_TOO_FEW_GROUPS", column = g, min = 2, k = k)
Y <- as.matrix(df[variables])
storage.mode(Y) <- "double"
codes <- as.integer(df[[g]]) - 1L
groups <- lapply(seq_len(k) - 1L, function(i) Y[codes == i, , drop = FALSE])
dims <- length(variables)
group_rows <- vapply(groups, nrow, 0L)
small <- which(group_rows <= dims)
# each group's covariance matrix needs more rows than variables
if (length(small)) cs_error("CS_E_SMALL_GROUP", min = dims + 1, group = levels_g[small[1]], n = group_rows[small[1]])
for (j in seq_along(variables)) {
# a constant variable makes every covariance matrix singular
if (length(unique(Y[, j])) < 2) cs_error("CS_E_CONSTANT", column = variables[j])
}
res <- cs_mv_box_m(groups)
p <- if (approximation == "f") res$f_p else res$p
n <- nrow(Y)
# %% Assumptions
resid <- do.call(rbind, lapply(groups, function(x) sweep(x, 2, colMeans(x))))
assumptions <- list()
mardia <- if (n > dims + 1) cs_mv_mardia(resid) else NULL
if (!is.null(mardia)) {
ok <- mardia$skew_p >= 0.05 && mardia$kurt_p >= 0.05
assumptions[[1]] <- list(key = "mv_normality", label = "Multivariate normality within groups", status = if (ok) "pass" else "warn",
statistic = mardia$kurt_z, p = min(mardia$skew_p, mardia$kurt_p),
detail = paste0(sprintf("Mardia skewness %s, kurtosis z = %.2f, %s", cs_fmt_p(mardia$skew_p), mardia$kurt_z, cs_fmt_p(mardia$kurt_p)),
if (ok) "." else "; Box's M then often rejects because of the tails, not the covariances — read it with care."))
}
min_n <- min(vapply(groups, nrow, 0L))
assumptions[[length(assumptions) + 1]] <- list(key = "group_size", label = "Each group larger than the number of variables", status = if (min_n >= 20) "pass" else "info",
detail = paste0(sprintf("Smallest group: %d rows for %d variables", min_n, dims),
if (min_n >= 20) "." else "; small groups make Box's M unstable — prefer the F approximation."))
# %% Result
reject <- p < alpha
lab <- if (approximation == "f") "F" else "χ²"
summary <- paste0(sprintf("Box's M = %.2f compares the covariance matrices of %s across %d groups of %s: ", res$m, paste(variables, collapse = ", "), k, g),
if (reject) sprintf("they differ (%s approximation, %s < α = %s).", lab, cs_fmt_p(p), format(alpha))
else sprintf("no evidence that they differ (%s approximation, %s, α = %s).", lab, cs_fmt_p(p), format(alpha)))
spread <- max(res$logdet) - min(res$logdet)
summary <- paste(summary, sprintf("Log-determinants range over %.2f (generalized variance ratio %.1f×).", spread, exp(spread)))
values <- list(m = res$m, chisq = res$chisq, df = res$df, chisq_p = res$p, f = res$f, f_df1 = res$f_df1, f_df2 = res$f_df2,
f_p = res$f_p, p = p, k = k, n = n, dims = dims, logdet_pooled = res$logdet_pooled,
mardia_skew_p = if (is.null(mardia)) NULL else mardia$skew_p, mardia_kurt_p = if (is.null(mardia)) NULL else mardia$kurt_p)
for (i in seq_len(k)) values[[sprintf("logdet[%s]", levels_g[i])]] <- res$logdet[i]
values$missing_share <- if (n_input > 0) n_dropped / n_input else 0
rows <- data.frame(group = c(levels_g, "Pooled"), n = c(vapply(groups, nrow, 0L), n), logdet = c(res$logdet, res$logdet_pooled))
chart_rows <- unique(round(seq(1, nrow(df), length.out = min(nrow(df), 5000))))
cs_publish(list(
method = "multivariate.box_m",
methodVersion = "1.0.1",
title = "Box's M test of equal covariance matrices",
engine = cs_engine_info("stats", "nanoparquet"),
n = n,
summary = summary,
apa = if (approximation == "f") sprintf("Box's M = %s, F(%.0f, %.2f) = %s, %s", cs_fmt_num(res$m), res$f_df1, res$f_df2, cs_fmt_num(res$f), cs_fmt_p(p))
else sprintf("Box's M = %s, χ²(%.0f) = %s, %s", cs_fmt_num(res$m), res$df, cs_fmt_num(res$chisq), cs_fmt_p(p)),
statistics = list(list(key = "m", label = "M", value = res$m),
list(key = "chisq", label = "χ²", value = res$chisq), list(key = "df", label = "df", value = res$df),
list(key = "f", label = "F", value = res$f), list(key = "f_df2", label = "F df2", value = res$f_df2),
list(key = "p", label = "p", value = p, format = "p")),
tables = list(list(key = "logdet", title = "Log-determinants of the covariance matrices",
columns = list(list(key = "group", label = g, type = "string"), list(key = "n", label = "n", type = "integer"),
list(key = "logdet", label = "ln |S|", type = "number")),
rows = rows)),
effectSizes = list(),
assumptions = assumptions,
warnings = warnings,
notes = list(sprintf("Box's M with the χ² approximation (1 − c₁)M, c₁ = %.5f, and Box's F approximation; conventionally judged at α = 0.001 because it is sensitive to non-normality and large samples (Tabachnick & Fidell 2019).", res$c1)),
values = values,
charts = list(cs_chart("ellipse", "confidence-ellipse", sprintf("%s and %s: 68%% data ellipses by %s", variables[1], variables[2], g), list(
x = cs_col(variables[1], Y[chart_rows, 1]),
y = cs_col(variables[2], Y[chart_rows, 2]),
group = cs_col(g, as.character(df[[g]][chart_rows]), levels = levels_g)), controls = list(kind = "data", level = 0.68)))
))
Box's M = 146.66, χ²(20) = 140.94, p < .001
- M
- 146.66
- χ²
- 140.94
- df
- 20
- F
- 7.045
- F df2
- 77566.75
- p
- < .001
To keep this page light, the plots are shown once, under the R tab.
Assumptions
- Multivariate normality within groups — Mardia skewness p = .045, kurtosis z = 3.28, p = .001; Box's M then often rejects because of the tails, not the covariances — read it with care.
- Each group larger than the number of variables — Smallest group: 50 rows for 4 variables.
Log-determinants of the covariance matrices
| Species | n | ln |S| |
|---|---|---|
| setosa | 50 | −13.067 |
| versicolor | 50 | −10.874 |
| virginica | 50 | −8.927 |
| Pooled | 150 | −9.959 |
- Box's M with the χ² approximation (1 − c₁)M, c₁ = 0.03900, and Box's F approximation; conventionally judged at α = 0.001 because it is sensitive to non-normality and large samples (Tabachnick & Fidell 2019).
The exact Python script · Python Python 3.13.5 · scipy 1.18.1 · pandas 3.1.0
# Box's M test of equal covariance matrices
# Generated by CodeSplash Analytics 1.0.0 on 2026-11-09 · method multivariate.box_m 1.0.1 · spec 0f5288dce6992b6b
# Dataset: iris (version 1)
# Runs on its own: outside the app, cs.publish() writes $CS_RESULT_PATH or prints the result JSON.
# %% Setup
import numpy as np
import pandas as pd
from scipy import stats
import codesplash as cs
from codesplash.stats import multivariate as mv
# %% Data
df = pd.read_parquet("tests/parity/fixtures/iris.parquet", columns=["Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width", "Species"])
n_input = len(df)
df["Species"] = pd.Categorical(df["Species"], categories=["setosa", "versicolor", "virginica"]) # stored level order
df = df.dropna(subset=["Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width", "Species"]) # listwise deletion over the analysis columns
df["Species"] = df["Species"].cat.remove_unused_categories()
n_dropped = n_input - len(df)
warnings = []
if n_dropped:
warnings.append(cs.cs_warning("CS_W_ROWS_DROPPED", dropped=n_dropped, total=n_input))
if n_input and not len(df):
cs.cs_error("CS_E_NO_ROWS")
cs.check_finite_columns(df, ["Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width", "Species"]) # infinite values stop the run (registry/errors.yaml)
# %% Test
# Box (1949): M = (N − k) ln|S_p| − Σ (n_j − 1) ln|S_j| with χ² and F approximations (heplots::boxM).
variables = ["Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width"]
g = "Species"
approximation = "chisq" # chisq | f
alpha = 0.001
levels = [str(lv) for lv in df[g].cat.categories]
k = len(levels)
if k < 2:
cs.cs_error("CS_E_TOO_FEW_GROUPS", column=g, min=2, k=k)
Y = df[variables].to_numpy(dtype=float)
codes = df[g].cat.codes.to_numpy()
groups = [Y[codes == i] for i in range(k)]
dims = len(variables)
small = [(lv, x.shape[0]) for lv, x in zip(levels, groups) if x.shape[0] <= dims]
if small: # each group's covariance matrix needs more rows than variables
cs.cs_error("CS_E_SMALL_GROUP", min=dims + 1, group=small[0][0], n=small[0][1])
for j, v in enumerate(variables):
if len(np.unique(Y[:, j])) < 2: # a constant variable makes every covariance matrix singular
cs.cs_error("CS_E_CONSTANT", column=v)
res = mv.box_m(groups)
p = res["f_p"] if approximation == "f" else res["p"]
n = int(Y.shape[0])
# %% Assumptions
resid = np.vstack([x - x.mean(axis=0) for x in groups])
assumptions = []
mardia = mv.mardia(resid) if n > dims + 1 else None
if mardia is not None:
ok = mardia["skew_p"] >= 0.05 and mardia["kurt_p"] >= 0.05
assumptions.append({"key": "mv_normality", "label": "Multivariate normality within groups", "status": "pass" if ok else "warn",
"statistic": mardia["kurt_z"], "p": min(mardia["skew_p"], mardia["kurt_p"]),
"detail": f"Mardia skewness {cs.fmt_p(mardia['skew_p'])}, kurtosis z = {mardia['kurt_z']:.2f}, {cs.fmt_p(mardia['kurt_p'])}"
+ ("." if ok else "; Box's M then often rejects because of the tails, not the covariances — read it with care.")})
min_n = int(min(x.shape[0] for x in groups))
assumptions.append({"key": "group_size", "label": "Each group larger than the number of variables", "status": "pass" if min_n >= 20 else "info",
"detail": f"Smallest group: {min_n} rows for {dims} variables" + ("." if min_n >= 20 else "; small groups make Box's M unstable — prefer the F approximation.")})
# %% Result
reject = p < alpha
summary = (f"Box's M = {res['m']:.2f} compares the covariance matrices of {', '.join(variables)} across {k} groups of {g}: "
+ (f"they differ ({'F' if approximation == 'f' else 'χ²'} approximation, {cs.fmt_p(p)} < α = {alpha:g})." if reject
else f"no evidence that they differ ({'F' if approximation == 'f' else 'χ²'} approximation, {cs.fmt_p(p)}, α = {alpha:g})."))
spread = max(res["logdet"]) - min(res["logdet"])
summary += f" Log-determinants range over {spread:.2f} (generalized variance ratio {np.exp(spread):.1f}×)."
values = {"m": res["m"], "chisq": res["chisq"], "df": res["df"], "chisq_p": res["p"], "f": res["f"], "f_df1": res["f_df1"], "f_df2": res["f_df2"],
"f_p": res["f_p"], "p": p, "k": k, "n": n, "dims": dims, "logdet_pooled": res["logdet_pooled"],
"mardia_skew_p": None if mardia is None else mardia["skew_p"], "mardia_kurt_p": None if mardia is None else mardia["kurt_p"]}
for lv, ld in zip(levels, res["logdet"]):
values[f"logdet[{lv}]"] = float(ld)
values["missing_share"] = n_dropped / n_input if n_input else 0.0
rows = [{"group": lv, "n": int(x.shape[0]), "logdet": float(ld)} for lv, x, ld in zip(levels, groups, res["logdet"])]
rows.append({"group": "Pooled", "n": n, "logdet": res["logdet_pooled"]})
chart_rows = np.unique(np.round(np.linspace(0, len(df) - 1, min(len(df), 5000))).astype(int))
cs.publish({
"method": "multivariate.box_m",
"methodVersion": "1.0.1",
"title": "Box's M test of equal covariance matrices",
"engine": cs.engine_info("pandas", "numpy", "scipy"),
"n": n,
"summary": summary,
"apa": (f"Box's M = {cs.fmt_num(res['m'])}, F({res['f_df1']:.0f}, {res['f_df2']:.2f}) = {cs.fmt_num(res['f'])}, {cs.fmt_p(p)}" if approximation == "f"
else f"Box's M = {cs.fmt_num(res['m'])}, χ²({res['df']:.0f}) = {cs.fmt_num(res['chisq'])}, {cs.fmt_p(p)}"),
"statistics": [{"key": "m", "label": "M", "value": res["m"]},
{"key": "chisq", "label": "χ²", "value": res["chisq"]}, {"key": "df", "label": "df", "value": res["df"]},
{"key": "f", "label": "F", "value": res["f"]}, {"key": "f_df2", "label": "F df2", "value": res["f_df2"]},
{"key": "p", "label": "p", "value": p, "format": "p"}],
"tables": [{"key": "logdet", "title": "Log-determinants of the covariance matrices",
"columns": [{"key": "group", "label": g, "type": "string"}, {"key": "n", "label": "n", "type": "integer"},
{"key": "logdet", "label": "ln |S|", "type": "number"}],
"rows": rows}],
"effectSizes": [],
"assumptions": assumptions,
"warnings": warnings,
"notes": [f"Box's M with the χ² approximation (1 − c₁)M, c₁ = {res['c1']:.5f}, and Box's F approximation; conventionally judged at α = 0.001 because it is sensitive to non-normality and large samples (Tabachnick & Fidell 2019)."],
"values": values,
"charts": [cs.chart("ellipse", "confidence-ellipse", f"{variables[0]} and {variables[1]}: 68% data ellipses by {g}", {
"x": cs.col(variables[0], Y[chart_rows, 0]),
"y": cs.col(variables[1], Y[chart_rows, 1]),
"group": cs.col(g, df[g].astype(str).to_numpy()[chart_rows], levels=levels)}, controls={"kind": "data", "level": 0.68})],
})
For the iris species, (20) = 140.9, p < .001. Also, Mardia's kurtosis test gives p = .001, so non-normality may be contributing.
Open Log-determinants of the covariance matrices. Which species is the tightest? What would you change in a MANOVA of these data?
Two tests called sphericity
ReadThese two tests share a name and little else.
| Test | Null hypothesis | Used before |
|---|---|---|
| Bartlett's test of sphericity | The correlation matrix is the identity: variables are uncorrelated | Factor analysis or PCA |
| Mauchly's test | Differences between repeated measures have equal variances | Repeated-measures ANOVA |
For factor analysis, rejection is what you hope for. For repeated measures, rejection means you need a correction.
Match each result
PredictPredict first
Bartlett's sphericity test on seven attitude items gives (21) = 98.8, p < .001.
What does that tell you?
Reveal
There is correlation worth modeling, and the test says no more than that. With any reasonable sample, it almost always rejects. Look at KMO and the scree plot before you trust a factor solution.
Mauchly and its correction
ExploreIn a repeated-measures study, Mauchly's W = 0.61, p = .012. The Greenhouse–Geisser is 0.72.
BExplorable · The sphericity explorer
What does sphericity mean for repeated measures, and what does the Greenhouse–Geisser correction fix?
With no true change over time, how often does the uncorrected test reject?
Correlation decays with distance, so far-apart times are less related.
Commit your prediction above to see the result
Make your prediction to see the result.
Make adjacent times more correlated than distant ones, then compare the uncorrected and corrected Type I error. Mauchly's verdict in a small sample can be wrong in either direction, so many analysts report the corrected test whatever it says.
Check your understanding
CheckpointCheck yourself
Why is Box's M usually judged at α = 0.001?
Show the answer
Answer: b
A strict level limits false alarms from non-normality. If it still rejects, use Pillai's trace, or the unequal-covariance T² for two groups.
Check yourself
Which pairing is correct?
Show the answer
Answer: a
Note the separate Bartlett test for equal variances across groups. Same author, different question.
Check yourself
Before a factor analysis of nine items, Bartlett's test of sphericity gives p < 0.001. What does that license?
Show the answer
Answer: c
Rejection is the minimum you'd hope for, and with a decent sample it's nearly automatic.
Check yourself
Bartlett rejects, yet KMO is low. How do you read that?
Show the answer
Answer: a
The two ask different questions. Bartlett looks for any correlation, and KMO for how much is shared.
Check yourself
Sphericity holds automatically for repeated measures with how many levels?
Show the answer
Answer: 2
With 2 levels there's only one difference, so no variances can differ. Mauchly's test can't be computed there, and .
Check yourself
With df1 = 2 and Greenhouse–Geisser , what is the corrected df1?
Show the answer
Answer: 1.44
. The correction multiplies both degrees of freedom by .
Check yourself
Box's M has degrees of freedom. With 3 groups and 4 variables, how many is that?
Show the answer
Answer: 20
. A covariance matrix has many entries, so the test has many degrees of freedom even with few variables.
Check yourself
Box's M rejects at 0.001 and your group sizes are very unequal. What is the sound next step?
Show the answer
Answer: b
Pillai's robustness rests on similar cell sizes. With unequal sizes, pair it with T² for unequal covariances (two groups) or PERMANOVA with PERMDISP.
Do it in CodeSplash
In the appBox's M is its own method and also an assumption row on MANOVA and T². Reference distribution switches between χ² and F, which here gives p < .001 on two iris variables.
import pandas as pd
import pingouin as pg
df = pd.read_csv("iris.csv")
df.columns = ["sl", "sw", "pl", "pw", "species"]
print(pg.box_m(df, dvs=["sl", "sw", "pl", "pw"], group="species"))# install.packages("heplots")
heplots::boxM(iris[, 1:4], iris$Species)Recap
Recap- Box's M compares covariance matrices but also reacts to non-normality, so it is read at 0.001.
- Bartlett's sphericity asks if variables are uncorrelated; rejection is the usual start of a factor analysis.
- Mauchly's sphericity asks about repeated-measures differences; rejection calls for a correction.
- Treat these as a reason to look and choose a robust route, not as gates.
Concepts in this lesson