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

st: re: missing dummy variable

From   Kit Baum <>
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
An Introduction to Modern Econometrics Using Stata:

* For searches and help try:

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