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

From |
"Wallace, John" <John_Wallace@affymetrix.com> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: re: missing dummy variable |

Date |
Wed, 10 Oct 2007 10:59:28 -0700 |

Dear Statalisters, I have been exploring -xi3- recently, and I've been wondering why the e. option for generating indicator variables relative to the grand mean doesn't work the way Kit and Maarten describe. I've been playing with some toy datasets trying to figure out how to generate the 95% confidence intervals for the coefficient of the dropped level. I've managed to deduce how to calculate the coefficient itself, but the standard errors and so forth aren't obvious. Expanding on Maarten's example (with Kit's suggestion included): *------------------ begin example --------------- sysuse auto, clear gen domestic = !foreign rename make desc gen make = word( desc,1) tab make reg mpg foreign domestic, noconst hascons xi3: regress mpg e.foreign xi3: regress mpg e.make *------------------ end example --------------- Its clear that the information in the first two regressions is equivalent, but the display would be better still if it was a combination of both! If the _cons from the second regression was combined with the explicit listing of both indicators in the first. When the list of indicator variables gets long (as in the third regression) , and especially when there are interactions, the task of interpreting the dropped variables (and especially significance in the t-test relative to the grand mean) becomes non-trivial (to me at least). Is there something I'm missing? John W. -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Kit Baum Sent: Thursday, October 04, 2007 6:20 PM To: statalist@hsphsun2.harvard.edu Subject: st: re: missing dummy variable Maarten suggested You may have noticed that in the second model (both dummies) I did not have a constant in the equation, this is delibarate. If you want to enter all dummies you have to exclude the constant. The way to do that is to add the -noconst- option in Stata, see the example below: *------------------ begin example --------------- sysuse auto, clear gen domestic = !foreign reg mpg foreign reg mpg foreign domestic, noconst *------------------- end example ---------------- In the last command, I would use reg mpg foreign domestic, nocons hascons By adding the -hascons- option you are telling Stata that there really is a constant term in the equation by virtue of using the complete set of dummies. This will cause the F-stat of the second reg to be exactly like that of the first, as it is testing the hypothesis that the coeffs differ from the grand mean of mpg rather than from zero. Kit Baum, Boston College Economics and DIW Berlin http://ideas.repec.org/e/pba1.html An Introduction to Modern Econometrics Using Stata: http://www.stata-press.com/books/imeus.html * * 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/

**Follow-Ups**:**Re: st: RE: re: missing dummy variable***From:*Maarten buis <maartenbuis@yahoo.co.uk>

**References**:**st: re: missing dummy variable***From:*Kit Baum <baum@bc.edu>

- Prev by Date:
**st: re: moving standard deviation - panel data** - Next by Date:
**st: re: combine two variables for a dataset** - Previous by thread:
**st: re: missing dummy variable** - Next by thread:
**Re: st: RE: re: missing dummy variable** - Index(es):

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