{
  "name": "Methods for checking and handling unequal residual variance in regression",
  "description": "Compares four common ways to check or handle heteroscedasticity in a regression, with what each flags or does and the software function that implements it, compiled from statistical software documentation and statistics reference pages.",
  "page": "https://casrai.org/guides/what-is-homoscedasticity",
  "publisher": "CASRAI",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "dateModified": "2026-11-12T13:27:53Z",
  "temporalCoverage": null,
  "spatialCoverage": null,
  "columns": [
    {
      "name": "Method",
      "unit": "",
      "description": ""
    },
    {
      "name": "Role",
      "unit": "",
      "description": ""
    },
    {
      "name": "What it flags or does",
      "unit": "",
      "description": ""
    },
    {
      "name": "Software function",
      "unit": "",
      "description": ""
    }
  ],
  "rows": [
    {
      "Method": "Residuals vs fitted plot",
      "Role": "Visual check",
      "What it flags or does": "Horn or fan shape indicates the constant-variance assumption is not satisfied; reliable only if the model form fits the systematic variation",
      "Software function": "plot(mod, which = 1) in R"
    },
    {
      "Method": "Scale-location plot",
      "Role": "Visual check",
      "What it flags or does": "Non-flat smooth line of sqrt(|standardized residuals|) vs fitted values indicates a violation",
      "Software function": "plot(mod, which = 3) in R"
    },
    {
      "Method": "Breusch-Pagan test",
      "Role": "Formal test",
      "What it flags or does": "Null hypothesis: residual variance does not depend on the predictors; small p-value indicates heteroscedasticity",
      "Software function": "car::ncvTest(mod) in R; statsmodels het_breuschpagan(resid, exog_het, robust=True)"
    },
    {
      "Method": "Weighted least squares",
      "Role": "Remedy",
      "What it flags or does": "Fits with weights inversely proportional to the variances; omitting weights gives ordinary least squares",
      "Software function": "lm(y ~ x, weights = w) in R"
    }
  ],
  "sources": [
    {
      "title": "Regression Diagnostics in R: Homoscedasticity (SSCC, UW-Madison)",
      "url": "https://www.sscc.wisc.edu/sscc/pubs/RegDiag-R/homoscedasticity.html",
      "accessed": "2026-11-12"
    },
    {
      "title": "statsmodels het_breuschpagan",
      "url": "https://www.statsmodels.org/stable/generated/statsmodels.stats.diagnostic.het_breuschpagan.html",
      "accessed": "2026-11-12"
    },
    {
      "title": "R stats::lm manual",
      "url": "https://stat.ethz.ch/R-manual/R-devel/library/stats/html/lm.html",
      "accessed": "2026-11-12"
    },
    {
      "title": "NIST/SEMATECH e-Handbook 4.4.4.2",
      "url": "https://www.itl.nist.gov/div898/handbook/pmd/section4/pmd442.htm",
      "accessed": "2026-11-12"
    }
  ]
}