Statalist


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

Re: st: Dummy variable p value question


From   Richard Williams <[email protected]>
To   [email protected], [email protected]
Subject   Re: st: Dummy variable p value question
Date   Sun, 30 Nov 2008 20:29:30 -0500

At 08:11 PM 11/30/2008, Clive Nicholas wrote:
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.

Actually, I believe the models are the same but they are parameterized differently. The Anova table and R^2 get zapped when you say -nocons- because you haven't told regress that you have included the constant yourself. Instead try

reg mpg weight r1-r5, nocon hascons

and you'll see that the Anova table etc. is identical to what you get with

reg mpg weight r1-r4


-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  [email protected]
WWW:    http://www.nd.edu/~rwilliam

*
*   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/



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