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]] > > ______________________________________________ > [email protected] 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. > > ______________________________________________ [email protected] 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.
