热线电话:13121318867

登录
2018-10-24 阅读量: 1387
怎么计算inverse mills ratio(基于R)

R语言做probit回归之后,如何计算出inverse mills ratio?

在经历多方帮助(此处真的心累)算是找到了一个解决的办法:

library("sampleSelection")
data(Mroz87)
myProbit <- glm( lfp ~ nwifeinc + educ + exper + I( exper^2 ) + age +
   kids5 + kids618, family = binomial( link = "probit" ), data=Mroz87 )
Mroz87IMR<-invMillsRatio(myProbit)IMR<−invMillsRatio(myProbit)IMR1
myHeckit <- lm( log( wage ) ~ educ + exper + I( exper^2 ) + IMR,
   data = Mroz87[ Mroz87$lfp == 1, ] )

写贴不易,你确定不点个赞吗😋

99.9904
1
关注作者
收藏
评论(0)

发表评论

暂无数据
推荐帖子