Jimmy Verner wrote:
> Suppose you have an interval dependent variable Y, an interval independent
> variable B and a nominal variable C. C has four categories, C1, C2, C3 and
> C4. C is coded by four dummy variables, C1 through C4, with the value 1
> when "in play" and the value 0 otherwise.
>
> One may regress Y on B and C1 through C4 by dropping the constant:
>
> Model A: reg Y B C1 C2 C3 C4, nocon
>
> Alternatively, one may keep the constant but drop a category to avoid
> falling into the dummy variable trap. The constant replaces the dropped
> category:
>
> Model B: reg Y B C1 C2 C3
>
> If what I have said is correct, why are the p values different for C1
> through C3 between the two models? And should not the p value for C4 in
> Model A be the same as for the constant in Model B?
The coefficients are not the same because the models are not the same.
After
. webuse auto
. tab rep78, gen(r)
Compare
. reg mpg weight r1-r5, nocon
with
. reg mpg weight r1-r4
and notice that not even the model diagnostics are the same, since the
first model contains 1 degree of freedom more than the second model.
--
Clive Nicholas
[Please DO NOT mail me personally here, but at
<[email protected]>. Please respond to contributions I make in
a list thread here. Thanks!]
"My colleagues in the social sciences talk a great deal about
methodology. I prefer to call it style." -- Freeman J. Dyson.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/