Statalist


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

st: re: missing dummy variable


From   Kit Baum <[email protected]>
To   [email protected]
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/




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