Jump to content

White test: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
mNo edit summary
 
(46 intermediate revisions by 34 users not shown)
Line 1: Line 1:
{{Short description|Statistical test}}
In [[statistics]], the '''White test''' is a [[statistical test]] that establishes whether the [[errors and residuals in statistics|residual]] [[variance]] of a variable in a [[regression model]] is constant: that is for [[homoscedasticity]].
{{Distinguish|White information matrix test}}
'''White test''' is a [[statistical test]] that establishes whether the [[variance]] of the [[errors and residuals in statistics|errors]] in a [[regression model]] is constant: that is for [[homoskedasticity]].


This test, and an estimator for [[heteroscedasticity-consistent standard errors]], were proposed by [[Halbert White]] in 1980.<ref>{{cite journal
This test, and an estimator for [[heteroscedasticity-consistent standard errors]], were proposed by [[Halbert White]] in 1980.<ref>{{cite journal
|last=White |first=H. |authorlink=Halbert White
|last=White |first=H. |author-link=Halbert White
|year=1980
|year=1980
|title=A Heteroskedasticity-Consistent Covariance Matrix Estimator and a Direct Test for Heteroskedasticity
|title=A Heteroskedasticity-Consistent Covariance Matrix Estimator and a Direct Test for Heteroskedasticity
|journal=[[Econometrica]]
|journal=[[Econometrica]]
|volume=48 |issue=4 |pages=817&ndash;838
|volume=48 |issue=4 |pages=817–838
|mr=575027 | jstor = 1912934
|mr=575027 | jstor = 1912934
}}</ref> These methods have become extremely widely used, making this paper one of the most cited articles in economics.<ref>{{cite journal
|doi=10.2307/1912934 |citeseerx=10.1.1.11.7646 }}</ref> These methods have become widely used, making this paper one of the most cited articles in economics.<ref>{{cite journal
|title=What Has Mattered to Economics since 1970
|title=What Has Mattered to Economics since 1970
|journal=Journal of Economic Perspectives
|journal=Journal of Economic Perspectives
Line 16: Line 18:
|last3=Zingales |first3=L.
|last3=Zingales |first3=L.
|doi=10.1257/jep.20.4.189
|doi=10.1257/jep.20.4.189
|url=http://faculty.chicagogsb.edu/finance/papers/What%20Has%20Mattered%20to%20Economics%20Since%201970.pdf
|url=https://www.nber.org/papers/w12526.pdf
}}</ref>
|doi-access=free}}</ref>


In cases where the White test statistics is statistically significant, heteroscedasticity may not necessarily be the cause, but specification errors. In other words, “The White test can be a test of heteroscedasticity or specification error or both. If no cross product terms are introduced in the White test procedure, then this is a pure test of pure heteroscedasticity.
In cases where the White test statistic is statistically significant, heteroskedasticity may not necessarily be the cause; instead the problem could be a specification error. In other words, the White test can be a test of heteroskedasticity or specification error or both. If no cross product terms are introduced in the White test procedure, then this is a test of pure heteroskedasticity.
If cross product are introduced in model, then it is a test of both heteroscedasticity and specification bias.<ref>{{cite web|last=Imdadullah|first=Muhammad|title=White test for Heteroskedasticity|url=http://itfeature.com/heteroscedasticity/white-test-for-heteroskedasticity|work=http://itfeature.com|publisher=Imdadullah}}</ref>
If cross products are introduced in the model, then it is a test of both heteroskedasticity and specification bias.


==Testing constant variance==
== Testing constant variance ==
To test for constant variance one undertakes an auxiliary regression analysis: this regresses the squared residuals from the original regression model onto a set of [[regressor]]s that contain the original [[regressor]]s, the cross-products of the regressors and the squared regressors. One then inspects the <math>R^{2}</math>. The [[Lagrange multiplier test|Lagrange multiplier (LM) test]] statistic is the product of the ''R''<sup>2</sup> value and sample size:
To test for constant variance one undertakes an auxiliary regression analysis: this regresses the squared residuals from the original regression model onto a set of [[regressor]]s that contain the original regressors along with their squares and cross-products.<ref>{{cite book |first=Marno |last=Verbeek| author-link = Marno Verbeek|title=A Guide to Modern Econometrics |publisher=Wiley |year=2008 |edition=Third |isbn=978-0-470-51769-7 |pages=[https://archive.org/details/guidetomoderneco0003verb/page/99 99]–100 |url=https://archive.org/details/guidetomoderneco0003verb |url-access=registration }}</ref> One then inspects the ''R''<sup>2</sup>. The [[Lagrange multiplier test|Lagrange multiplier (LM) test]] statistic is the product of the ''R''<sup>2</sup> value and sample size:
:<math>\ LM = n \cdot R^2 .</math>
:<math>\text{LM} = n R^2 .</math>
This follows a [[chi-squared distribution]], with degrees of freedom equal to the number of estimated parameters (in the auxiliary regression).
This follows a [[chi-squared distribution]], with degrees of freedom equal to ''P''&nbsp;−&nbsp;1, where ''P'' is the number of estimated parameters (in the auxiliary regression).


The logic of the test is as follows. First, the squared residuals from the original model serve as a proxy for the variance of the error term at each observation. (The error term is assumed to have a mean of zero, and the [[variance]] of a zero-mean random variable is just the expectation of its square.) The independent variables in the auxiliary regression account for the possibility that the error variance depends on the values of the original regressors in some way (linear or quadratic). If the error term in the original model is in fact homoskedastic (has a constant variance) then the coefficients in the auxiliary regression (besides the constant) should be statistically indistinguishable from zero and the ''R''<sup>2</sup> should be “small". Conversely, a “large" ''R''<sup>2</sup> (scaled by the sample size so that it follows the chi-squared distribution) counts against the hypothesis of homoskedasticity.
An alternative to the White test is the [[Breusch–Pagan test]].


An alternative to the White test is the [[Breusch–Pagan test]], where the Breusch-Pagan test is designed to detect only linear forms of heteroskedasticity. Under certain conditions and a modification of one of the tests, they can be found to be algebraically equivalent.<ref>{{cite journal|doi=10.1016/0165-1765(83)90085-X|title=A note on algebraic equivalence of White's test and a variation of the Godfrey/Breusch-Pagan test for heteroscedasticity|journal=Economics Letters|volume=13|issue=2–3|pages=197–200|year=1983|last1=Waldman|first1=Donald M.}}</ref>
If homoscedasticity is rejected one can use [[heteroscedasticity-consistent standard errors]].


If homoskedasticity is rejected one can use [[heteroskedasticity-consistent standard errors]].
==See also==
*[[Heteroscedasticity]]


== Software implementations ==
==References==

* In [[R (programming language)|R]], White's Test can be implemented using the <code>white</code> function of the <code>skedastic</code> package.<ref>{{cite web|title=skedastic: Heteroskedasticity Diagnostics for Linear Regression Models|work=CRAN|url=https://cran.r-project.org/web/packages/skedastic/index.html}}</ref>

* In [[Python (programming language)|Python]], White's Test can be implemented using the <code>het_white</code> function of the <code>statsmodels.stats.diagnostic.het_white</code> <ref>{{cite web|title=statsmodels v0.12.1|url=https://www.statsmodels.org/stable/generated/statsmodels.stats.diagnostic.het_white.html}}</ref>
*In [[Stata]], the test can be implemented using the <code>estat imtest, white</code> function.<ref>{{Cite web|last=Stata|date=|title=regress postestimation — Postestimation tools for regress|url=https://www.stata.com/manuals13/rregresspostestimation.pdf}}</ref>

== See also ==
* [[Heteroskedasticity]]
* [[Breusch–Pagan test]]
* [[Glejser test]]
* [[Goldfeld–Quandt test]]
* [[Park test]]

== References ==
{{reflist}}
{{reflist}}

== Further reading ==
* {{cite book |last1=Gujarati |first1=Damodar N. |author-link=Damodar N. Gujarati |last2=Porter |first2=Dawn C.|author2-link=Dawn C. Porter |title=Basic Econometrics |location=New York |publisher=McGraw-Hill Irwin |edition=Fifth |year=2009 |pages=386–88 |isbn=978-0-07-337577-9 }}
* {{cite book |last=Kmenta |first=Jan |author-link=Jan Kmenta |pages=[https://archive.org/details/elementsofeconom0003kmen/page/292 292–298] |title=Elements of Econometrics |location=New York |publisher=Macmillan |year=1986 |edition=Second |isbn=978-0-02-365070-3 |url-access=registration |url=https://archive.org/details/elementsofeconom0003kmen/page/292 }}
* {{cite book |last=Wooldridge |first=Jeffrey M. |author-link=Jeffrey Wooldridge |title=Introductory Econometrics: A Modern Approach |publisher=South-Western |edition=Fifth |year=2013 |isbn=978-1-111-53439-4 |pages=269–70 }}


[[Category:Statistical tests]]
[[Category:Statistical tests]]
[[Category:Regression diagnostics]]
[[Category:Regression diagnostics]]

{{statistics-stub}}

Latest revision as of 17:09, 10 February 2024

White test is a statistical test that establishes whether the variance of the errors in a regression model is constant: that is for homoskedasticity.

This test, and an estimator for heteroscedasticity-consistent standard errors, were proposed by Halbert White in 1980.[1] These methods have become widely used, making this paper one of the most cited articles in economics.[2]

In cases where the White test statistic is statistically significant, heteroskedasticity may not necessarily be the cause; instead the problem could be a specification error. In other words, the White test can be a test of heteroskedasticity or specification error or both. If no cross product terms are introduced in the White test procedure, then this is a test of pure heteroskedasticity. If cross products are introduced in the model, then it is a test of both heteroskedasticity and specification bias.

Testing constant variance

[edit]

To test for constant variance one undertakes an auxiliary regression analysis: this regresses the squared residuals from the original regression model onto a set of regressors that contain the original regressors along with their squares and cross-products.[3] One then inspects the R2. The Lagrange multiplier (LM) test statistic is the product of the R2 value and sample size:

This follows a chi-squared distribution, with degrees of freedom equal to P − 1, where P is the number of estimated parameters (in the auxiliary regression).

The logic of the test is as follows. First, the squared residuals from the original model serve as a proxy for the variance of the error term at each observation. (The error term is assumed to have a mean of zero, and the variance of a zero-mean random variable is just the expectation of its square.) The independent variables in the auxiliary regression account for the possibility that the error variance depends on the values of the original regressors in some way (linear or quadratic). If the error term in the original model is in fact homoskedastic (has a constant variance) then the coefficients in the auxiliary regression (besides the constant) should be statistically indistinguishable from zero and the R2 should be “small". Conversely, a “large" R2 (scaled by the sample size so that it follows the chi-squared distribution) counts against the hypothesis of homoskedasticity.

An alternative to the White test is the Breusch–Pagan test, where the Breusch-Pagan test is designed to detect only linear forms of heteroskedasticity. Under certain conditions and a modification of one of the tests, they can be found to be algebraically equivalent.[4]

If homoskedasticity is rejected one can use heteroskedasticity-consistent standard errors.

Software implementations

[edit]
  • In R, White's Test can be implemented using the white function of the skedastic package.[5]
  • In Python, White's Test can be implemented using the het_white function of the statsmodels.stats.diagnostic.het_white [6]
  • In Stata, the test can be implemented using the estat imtest, white function.[7]

See also

[edit]

References

[edit]
  1. ^ White, H. (1980). "A Heteroskedasticity-Consistent Covariance Matrix Estimator and a Direct Test for Heteroskedasticity". Econometrica. 48 (4): 817–838. CiteSeerX 10.1.1.11.7646. doi:10.2307/1912934. JSTOR 1912934. MR 0575027.
  2. ^ Kim, E.H.; Morse, A.; Zingales, L. (2006). "What Has Mattered to Economics since 1970" (PDF). Journal of Economic Perspectives. 20 (4): 189–202. doi:10.1257/jep.20.4.189.
  3. ^ Verbeek, Marno (2008). A Guide to Modern Econometrics (Third ed.). Wiley. pp. 99–100. ISBN 978-0-470-51769-7.
  4. ^ Waldman, Donald M. (1983). "A note on algebraic equivalence of White's test and a variation of the Godfrey/Breusch-Pagan test for heteroscedasticity". Economics Letters. 13 (2–3): 197–200. doi:10.1016/0165-1765(83)90085-X.
  5. ^ "skedastic: Heteroskedasticity Diagnostics for Linear Regression Models". CRAN.
  6. ^ "statsmodels v0.12.1".
  7. ^ Stata. "regress postestimation — Postestimation tools for regress" (PDF).

Further reading

[edit]