Statalist The Stata Listserver


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

Re: st: compare two nested regression model


From   Richard Williams <[email protected]>
To   [email protected]
Subject   Re: st: compare two nested regression model
Date   Mon, 23 Oct 2006 21:07:40 -0500

At 09:43 AM 10/23/2006, liu nizi wrote:
dear all
 I have develped two nested regression model based on the same data.
How can I campare these two models by stata command?
thanks
                  fengqin
The -nestreg- command provides one easy to use approach. You could also install the -spost9- routines of Long & Freese and use their -fitstat- command. fitstat is quite handy for comparing various measures of fit for two models. Example:

. webuse auto
(1978 Automobile Data)

. quietly regress mpg trunk weight

. quietly fitstat, s(m1)

. quietly regress mpg trunk weight length turn

. fitstat, using(m1)

Measures of Fit for regress of mpg

Current Saved Difference
Model: regress regress
N: 74 74 0
Log-Lik Intercept Only -234.394 -234.394 0.000
Log-Lik Full Model -194.238 -195.093 0.855
D 388.477(69) 390.186(71) 1.709(2)
LR 80.312(4) 78.603(2) 1.709(2)
Prob > LR 0.000 0.000 0.425
R2 0.662 0.654 0.008
Adjusted R2 0.643 0.645 -0.002
AIC 5.385 5.354 0.031
AIC*n 398.477 396.186 2.291
BIC 91.496 84.597 6.899
BIC' -63.096 -69.995 6.899
BIC used by Stata 409.997 403.098 6.899
AIC used by Stata 398.477 396.186 2.291

Difference of 6.899 in BIC' provides strong support for saved model.

Note: p-value for difference in LR is only valid if models are nested.



-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: [email protected]
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc
*
* 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