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

From |
Kit Baum <baum@bc.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: re: missing dummy variable |

Date |
Thu, 4 Oct 2007 21:19:58 -0400 |

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/

**Follow-Ups**:**st: RE: re: missing dummy variable***From:*"Wallace, John" <John_Wallace@affymetrix.com>

- Prev by Date:
**st: Simple longitudinal data question – drug continuation rate** - Next by Date:
**st: Re: Rasch** - Previous by thread:
**st: Modelling the passage of time: OLS vs survival analysis** - Next by thread:
**st: RE: re: missing dummy variable** - Index(es):

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