{
  "name": "R functions for testing equality of variances across groups",
  "description": "Four R functions that test the null hypothesis that group variances are equal, compared by package, call form and what each one's reference documentation states about it. Compiled from the car, rstatix and R stats reference manual pages and the NIST/SEMATECH e-Handbook.",
  "page": "https://casrai.org/guides/levenes-test-in-r",
  "publisher": "CASRAI",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "dateModified": "2026-11-18T02:56:08Z",
  "temporalCoverage": null,
  "spatialCoverage": null,
  "columns": [
    {
      "name": "Function",
      "unit": "",
      "description": ""
    },
    {
      "name": "Package",
      "unit": "",
      "description": ""
    },
    {
      "name": "Installation",
      "unit": "",
      "description": ""
    },
    {
      "name": "Call form in the documentation",
      "unit": "",
      "description": ""
    },
    {
      "name": "What the documentation says",
      "unit": "",
      "description": ""
    }
  ],
  "rows": [
    {
      "Function": "leveneTest()",
      "Package": "car",
      "Installation": "install.packages(\"car\")",
      "Call form in the documentation": "leveneTest(y, group, center = median); formula and data; lm object",
      "What the documentation says": "Default centre is the median (robust); center = mean gives the original Levene's test; trim passes through to the centre function"
    },
    {
      "Function": "levene_test()",
      "Package": "rstatix",
      "Installation": "install.packages(\"rstatix\")",
      "Call form in the documentation": "levene_test(data, formula, center = median)",
      "What the documentation says": "Wrapper around leveneTest(); handles grouped data; returns a data frame with df1, df2, statistic and p"
    },
    {
      "Function": "bartlett.test()",
      "Package": "stats",
      "Installation": "None (ships with R)",
      "Call form in the documentation": "x and g, or formula and data",
      "What the documentation says": "Tests the null that the variances in each group are the same"
    },
    {
      "Function": "fligner.test()",
      "Package": "stats",
      "Installation": "None (ships with R)",
      "Call form in the documentation": "x and g, or formula and data",
      "What the documentation says": "Fligner-Killeen (median) test of the null that the variances in each group are the same"
    }
  ],
  "sources": [
    {
      "title": "car: leveneTest reference page",
      "url": "https://rdrr.io/cran/car/man/leveneTest.html",
      "accessed": "2026-11-17"
    },
    {
      "title": "rstatix: levene_test reference page",
      "url": "https://rdrr.io/cran/rstatix/man/levene_test.html",
      "accessed": "2026-11-17"
    },
    {
      "title": "R stats: bartlett.test reference page",
      "url": "https://rdrr.io/r/stats/bartlett.test.html",
      "accessed": "2026-11-17"
    },
    {
      "title": "R stats: fligner.test reference page",
      "url": "https://rdrr.io/r/stats/fligner.test.html",
      "accessed": "2026-11-17"
    }
  ]
}