Statalist The Stata Listserver


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

Re: st: RE: statalist-digest V4 #2695


From   Richard Williams <[email protected]>
To   [email protected]
Subject   Re: st: RE: statalist-digest V4 #2695
Date   Sun, 13 May 2007 12:25:47 -0500

At 10:58 AM 5/13/2007, Alan Acock wrote:
The pathreg command is useful and an easy way to keep the sample size
consistent for each prediction. Unfortunately, I don't think it reports the
R-square for each equation and that is usually important information.
As a sidelight, for many purposes the reg3 command may be a little more useful than pathreg, e.g.

. sysuse auto
(1978 Automobile Data)

. pathreg (weight foreign) (price weight foreign)

------------------------------------------------------------------------------
weight | Coef. Std. Err. t P>|t| Beta
-------------+----------------------------------------------------------------
foreign | -1001.206 160.2876 -6.25 0.000 -.5928299
_cons | 3317.115 87.39676 37.95 0.000 .
------------------------------------------------------------------------------
n = 74 R2 = 0.3514 sqrt(1 - R2) = 0.8053

------------------------------------------------------------------------------
price | Coef. Std. Err. t P>|t| Beta
-------------+----------------------------------------------------------------
weight | 3.320737 .3958784 8.39 0.000 .8750157
foreign | 3637.001 668.583 5.44 0.000 .5674549
_cons | -4942.844 1345.591 -3.67 0.000 .
------------------------------------------------------------------------------
n = 74 R2 = 0.4989 sqrt(1 - R2) = 0.7079


. reg3 (weight foreign) (price weight foreign), ols

Multivariate regression
----------------------------------------------------------------------
Equation Obs Parms RMSE "R-sq" F-Stat P
----------------------------------------------------------------------
weight 74 1 630.227 0.3514 39.02 0.0000
price 74 2 2117.021 0.4989 35.35 0.0000
----------------------------------------------------------------------

------------------------------------------------------------------------------
| Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
weight |
foreign | -1001.206 160.2876 -6.25 0.000 -1318.045 -684.3671
_cons | 3317.115 87.39676 37.95 0.000 3144.359 3489.872
-------------+----------------------------------------------------------------
price |
weight | 3.320737 .3958784 8.39 0.000 2.538207 4.103267
foreign | 3637.001 668.583 5.44 0.000 2315.419 4958.584
_cons | -4942.844 1345.591 -3.67 0.000 -7602.663 -2283.025
------------------------------------------------------------------------------



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