[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Dummy variable p value question

From   "Clive Nicholas" <>
Subject   Re: st: Dummy variable p value question
Date   Mon, 1 Dec 2008 01:11:10 +0000

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.


. webuse auto

. tab rep78, gen(r)


. reg mpg weight r1-r5, nocon


. 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
<>. 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:

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