首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >检验两种优势比的差异

检验两种优势比的差异
EN

Stack Overflow用户
提问于 2015-01-26 23:50:02
回答 1查看 2.3K关注 0票数 0

我为年轻人建立了一个逻辑模型,另一个对老年人具有相同预后因素的逻辑模型。我想比较两组老年人和年轻人的两种预后因素。我需要检验两种优势比是否有显着性差异,并得到两组间差异的p值。你能给我施塔塔命令吗?

EN

回答 1

Stack Overflow用户

发布于 2015-01-27 09:02:36

代码语言:javascript
复制
// data preparation
sysuse auto, clear
gen byte good = (rep78 > 3) if !missing(rep78)
replace price = price / 1000
label var price "price in 1000s dollars"

// ============================= method 1
// estimate the models separately
logit good price mpg if foreign == 0
est store dom

logit good price mpg if foreign == 1
est store for

// combine the models
suest dom for

// test
test [dom_good]mpg = [for_good]mpg

// see the chi^2 value in more detail:
di r(chi2)

// ============================= method 2
// do it all in one model without any 
// post-estimation commands

logit good i.foreign##(c.price c.mpg), vce(robust)
// look at the p-value next to the coefficient of
// the interaction term between foreign and mpg

// ============================= bonus
// Show that the two methods are exactly the same

// method 2 reportes the test as a z-statistic, but
// the p-value is the same. we can transform the
// z-statistic and see that method 2 results in
// the exact same chi^2 value:
di (_b[1.foreign#c.mpg]/_se[1.foreign#c.mpg])^2

我个人更喜欢方法2。然而,目前的技术是,你不能比较这些比数比(我不同意,但我是少数)见。

Allison,P.D.(1999年)。比较各组间的logit和probit系数。社会学方法与研究28(2),186-208。http://dx.doi.org/10.1177/0049124199028002003

Breen,R.,Holm,A.和Karlson,K. B. (2014年)。关联与非线性概率模型。社会学方法与研究43(4),571-605。http://dx.doi.org/10.1177/0049124114544224

Mood,C. (2010)。逻辑回归:为什么我们不能做我们认为我们能做的,以及我们能做什么。“欧洲社会学评论”,第26(1)、67-82。http://dx.doi.org/10.1093/esr/jcp006

Neuhaus,J.M.和N. P. Jewell (1993年)。一种用于评估广义线性模型中省略协变量的偏差的几何方法。Biometrika 80(4),807-815。http://dx.doi.org/10.1093/biomet/80.4.807

Williams,R. (2009)。采用异质选择模型比较各组间的logit和probit系数。社会学方法与研究37(4),531-559。http://dx.doi.org/10.1177/0049124109335735

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/28161173

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档