Skip to content

regression test for constant variance - add Levene or Brown-Forsythe #866

Open

Description

@josef-pkt

we have
statsmodels.stats.diagnostic.HetGoldfeldQuandt
which is based on the F-test.

However, the F-test for equality of variances is very non-robust to deviation from normality (much more so than means).

Levene or Brown-Forsythe would be a robuster alternative.

see also page 3 of http://www.stat.ucdavis.edu/%7Eaganguly/STA108/6.Diagnostics_in_R.doc

there is also no reason to restrict to only 2 subsets, e.g. allow one-way heterogeneity by specifying groups.

http://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_glm_a0000000869.htm

main question is whether we should adjust the degrees of freedom in the equal variance tests to take account of the estimated regression parameters (if not, then we can just call Levene or similar with the residuals.)

Activity

  1. josef-pkt commented on Jun 2, 2014

    @josef-pkt
    MemberAuthor

    Stata has Levene and Brown-Forsythe as sdtest and sdtesti (standalone function) not regression associated.

  2. josef-pkt commented on Jan 22, 2020

    @josef-pkt
    MemberAuthor

    difficult to find issue: better serch terms: (outlier, distribution) robust ANOVA, trimmed ANOVA
    winsorized

    I found a script of mine from 2013, not committed to any branch AFAICS
    "\josef\eclipsegworkspace\statsmodels-git\statsmodels\josef_new\statsmodels\stats\robust_compare.py"

    that directory has an open git branch for it with uncommitted changes :)
    branch wasn't pushed to github AFAICS.

    includes Welsh anova
    and various ANOVA for equality of variances like Levene (which is also in scipy AFAIR). those are just ANOVA of transformed variances or dispersion measures.

    scipy has obrien transform for use with standard ANOVA
    https://docs.scipy.org/doc/scipy-0.17.0/reference/generated/scipy.stats.obrientransform.html

    see also https://en.wikipedia.org/wiki/Brown%E2%80%93Forsythe_test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions