Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: heteroskedasticity questions


From   "Schaffer, Mark E" <[email protected]>
To   <[email protected]>
Subject   st: RE: heteroskedasticity questions
Date   Sat, 24 Feb 2007 16:02:54 -0000

Richard,

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> Richard Williams
> Sent: 24 February 2007 15:16
> To: [email protected]
> Subject: st: heteroskedasticity questions
> 
> Here are a few questions that will betray my ignorance in 
> some areas of statistics...
> 
> -estat hettest- tests for a specific type of heteroskedasticity, i.e. 
> it tests whether the residual variances go up as yhat goes 
> up.  However, there are other possible forms of hetero, e.g. 
> error variances go up as x gets more extreme in either 
> direction, producing an hourglass shape.  This can be simulated via
> 
> set seed 123
> set obs 200
> corr2data x e
> gen y = x + 2*abs(x)*e
> scatter y x
> reg y x
> 
> If you now type -estat hettest-, as expected, the test stat 
> is insignificant.

One way to approach this that is easy to understand is to use
-ivhettest-, which will handle OLS as a special case.

esttat hettest

gives you the same test stat as

ivhettest, ivlev bpg

which is the Breusch-Pagan-Godfrey-Cook-Weisberg version of the test
that assumes normality and the indicator variables (so to speak, the
directions in which you are looking for heteroskedasticity) are the
regressors excluding the constant (here, x).

If you replace -bpg- with -nr2- you get the Koenker-White N*R-sq
statistic that loosens the normality assumption.

More useful for your purposes is varying the indicator variables.
-fitlev- means the indicator variable is the fitted value of the
dependent variable.  -fitsq- means the indicator variables are the
fitted value and its square.  -ivsq- means they are the regressors and
their squares, and -ivcp- means they are the regressors, squares and
cross-products.

This last one is White's general test for heteroskedasticity, when used
with the -nr2- option.  And if I'm not mistaken, it is also the
heteroskedasticity test stat reported by -estat imtest-.

If you play around with these, you'll see that the het stat picks up
your heteroskedasticity once the square terms appear in the indicator
variables.

-ivhettest- is documented fairly well in the help file and in
Baum-Schaffer-Stillman, SJ (2003).

Cheers,
Mark

> However, how should you formally test for 
> hetero in this case? -estat imtest- does produce a 
> significant chi-square; is that just happy coincidence or is 
> this a good all purpose test for hetero?  (Basically, what i 
> am saying is I don't understand what -estat imtest- does!  
> I'm thinking it is a more general test than hettest, but the 
> generality can also cost it some power compared to tests that 
> are more specific.)  Also, would it be appropriate to do 
> something like
> 
> gen xabs = abs(x)
> estat hettest xabs
> 
> i.e. based on visual inspection (with data I had not made up) 
> could I try to construct a var that I thought reflected the hetero?
> 
> Finally, Goldfeldt-Quant and -estat hettest- seem to be 
> testing similar hypotheses.  Goldfeldt-Quant is a little 
> clunky to estimate, though, so is there any reason I would 
> prefer it over -hettest-?  (I actually asked this question 3 
> years ago, but I don't think I got a definitive answer, or if 
> I did I can't find it anymore).
> 
> Thanks for any ideas.
> 
> -------------------------------------------
> Richard Williams, Notre Dame Dept of Sociology
> OFFICE: (574)631-6668, (574)631-6463
> HOME:   (574)289-5227
> EMAIL:  [email protected]
> WWW:    http://www.nd.edu/~rwilliam
> 
> *
> *   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/
> 

*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index