Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: xtpcse vs. xtpcse, noconstant


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: xtpcse vs. xtpcse, noconstant
Date   Mon, 9 Aug 2004 09:14:27 +0100

On the R^2, your starting point is now a prediction of zero, 
not a prediction of the mean response. 

In a much simpler case, below,  dropping the constant 
gives a higher R-sq but a totally ludicrous model. Why then 
does the R-sq look so good? Because the predictions 
-- which range from 11 to 30 mpg -- are much closer to 
the data than a prediction of 0 than the predictions of 
the first model to the mean of -mpg-. Your model is more 
complicated, and I can't see your data, but I guess that
the same applies. If there is a really good reason, 
like a law of physics, to force predictions through 
the origin, then do it. (One can certainly improve 
on a linear regression of -mpg- on -weight-, a secondary 
point.) 

. sysuse auto, clear
(1978 Automobile Data)

. reg mpg weight 

      Source |       SS       df       MS              Number of obs =      74
-------------+------------------------------           F(  1,    72) =  134.62
       Model |   1591.9902     1   1591.9902           Prob > F      =  0.0000
    Residual |  851.469256    72  11.8259619           R-squared     =  0.6515
-------------+------------------------------           Adj R-squared =  0.6467
       Total |  2443.45946    73  33.4720474           Root MSE      =  3.4389

------------------------------------------------------------------------------
         mpg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      weight |  -.0060087   .0005179   -11.60   0.000    -.0070411   -.0049763
       _cons |   39.44028   1.614003    24.44   0.000     36.22283    42.65774
------------------------------------------------------------------------------

. reg mpg weight , noconst

      Source |       SS       df       MS              Number of obs =      74
-------------+------------------------------           F(  1,    73) =  259.18
       Model |  28094.8545     1  28094.8545           Prob > F      =  0.0000
    Residual |  7913.14549    73  108.399253           R-squared     =  0.7802
-------------+------------------------------           Adj R-squared =  0.7772
       Total |       36008    74  486.594595           Root MSE      =  10.411

------------------------------------------------------------------------------
         mpg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      weight |    .006252   .0003883    16.10   0.000     .0054781     .007026
------------------------------------------------------------------------------

Nick 
[email protected] 

chris carambas

>   I estimated an xtpcse model, and I observed that any of my 
> runs without
> noconstant option has very low R-squared (i.e. 0.08--and this 
> is the same
> result if I run it in xtreg which has no nocons option) but 
> with noconstant
> option, all R-squared become high (i.e. from 0.80).Does anyone have
> explanation for that?

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