I'm trying to use Stata 7 to perform White's test for heteroskedasticity
of unknown form. It appears to me from the help documents that Stata
does not have a command to automatically perform this test; is that
correct?
I'm performing it by generating squared residuals and squared
values of the independent variables. That is, given the original
regression
y = b0 + b1*x1 + b2*x2 + e
I'm generating e-hat squared, calling it resid2, generating x1sq
and x2sq, and estimating
resid2 = g0 + g1*x1 + g2*x1sq + g3*x2 + g4*x2sq + u
and then either taking the F-stat from the regression or calculating
N*R2 which has a chi-squared 4 distribution under the null of no
heteroskedasticity.
Question 1: Is this the best way to do this in Stata?
Question 2: I've also tried using the commands "hettest x1 x2"
and "hettest x1 x2 x1sq x2sq". They do not give the same answers,
not close. Can someone give a brief description of what hettest
does, or a citation to the original article? I'm familiar with
the Bruesch-Pagan-Godfrey test, but the Cook-Weisburg test which
is also known as the Breusch-Pagan test appears not to be the
same thing.
Question 3: I'm also interested in using White's robust standard
error formula. The documentation says that "regress y x1 x2, robust"
will use the "Huber/White/sandwich" standard error formula. Is that
the same thing, and if not, how do they differ?
Thanks in advance for assistance.
Steve Schmidt
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/