Re: [R] white test to check homoscedasticity of the residuals

From: Achim Zeileis <Achim.Zeileis_at_wu-wien.ac.at>
Date: Wed, 30 May 2007 16:18:15 +0200 (CEST)


On Wed, 30 May 2007, Benoit Chemineau wrote:

> Hi R-programmers,
>
> I can't find find the White test to check the homoscedasticity of the
> residuals from a linear model. Could you please help me with this?

The package "lmtest" includes the function bptest() for performing Breusch-Pagan tests. White's test is a special case of this. For example, if you fit a linear regression
  fm <- lm(y ~ x + z, data = foo)
then you can carry out White's test via
  bptest(fm, ~ x * z + I(x^2) + I(z^2), data = foo) i.e., include all regressors and the squares/cross-products in the auxiliary regression.

I haven't yet written a simple convenience interface for this...

hth,
Z

> Thank you !
>
> BC
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>



R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 30 May 2007 - 14:51:30 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 30 May 2007 - 15:01:12 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.