互助問答第297期:關(guān)于預(yù)測反米爾斯比率的問題
關(guān)于預(yù)測反米爾斯比率的問題
麻煩問一下各位老師同學(xué),做了似不相關(guān)雙邊probit模型后,怎樣預(yù)測對應(yīng)的反米爾斯比率,目的是把兩個方程的反米爾斯放到第二階段的回歸中,希望各位老師同學(xué)解惑,謝謝大家!
//help biprobit
//Examples
????//webuse school ,giving up for firewall
cd D:\biprobit_heckprobit_mill
use school,clear
????//Bivariate probit regression
????????biprobit private vote logptax loginc years
????//Seemingly unrelated bivariate probit regression
????????biprobit (private = logptax loginc years) (vote = logptax years)
????//Seemingly unrelated bivariate probit regression with robust standard errors
????????biprobit (private = logptax loginc years) (vote = logptax years), vce(robust)
****************************help heckprobit******************************************
//[R] heckprobit -- Probit model with sample selection
?????????????????//(View complete PDF manual entry)
????//Fit a probit model with sample selection
????????heckprobit private years logptax, sel(vote=years loginc logptax)
????//Replay results, but display legend of coefficients rather than the statistics for the coefficients
????????heckprobit, coeflegend
//stata中heckprobit命令的查詢可知rho即為實(shí)際的逆米爾茲比
//https://bbs.pinggu.org/thread-2660588-1-1.html
****probit 提取inverse mills ratio
probit ?private vote logptax loginc years,nolog // possibility of being open region?predict gw, xb?g lambda=normalden(gw)/normal(gw) if private==1
replace lambda=-normalden(gw)/normal(-gw) if private==0 ?// generate inverse mills ratio (selection model)
?
//怎么在stata中計(jì)算mills ratio
probit private vote logptax loginc years,nolog?
predict gw, xb
replace lambda=normalden(gw,0,1)/normal(gw) if private==1?
replace lambda=-normalden(gw,0,1)/normal(-gw) if private==0
*y是0-1變量,x1-xn是解釋變量,lambda即IMR
//http://bbs.pinggu.org/thread-1087688-1-1.html?winzoom=1
往期回顧:
互助問答第296期:關(guān)于PSM-DID的問題
如果您在計(jì)量學(xué)習(xí)和實(shí)證研究中遇到問題,請及時發(fā)到郵箱szlw58@126.com,專業(yè)委員會有30多名編輯都會看,您的問題會得到及時關(guān)注!請您將問題描述清楚,任何有助于把問題描述清楚的細(xì)節(jié)都能使我們更方便地回答您的問題,提問細(xì)則參見:實(shí)證研究互助平臺最新通知(點(diǎn)擊文末閱讀原文查看詳情)
鮮活的事例更有助于提高您的研究水平,呆板的教科書讓人生厭。如果您喜歡,請?zhí)岢瞿膯栴},也請轉(zhuǎn)發(fā)推廣!
(歡迎轉(zhuǎn)發(fā),歡迎分享;轉(zhuǎn)載請注明出處,引用和合作請留言。本文作者擁有所有版權(quán),原創(chuàng)文章最早發(fā)表于“學(xué)術(shù)苑”。任何侵權(quán)行為將面臨追責(zé)?。?/p>
學(xué)術(shù)指導(dǎo):張曉峒老師 Ben Lambert
本期解答人:謝杰老師
編輯:陳波
統(tǒng)籌:左川 李丹丹
技術(shù):劉子瑗
全文完,感謝您的耐心閱讀
請順手點(diǎn)個“在看”吧~
閱讀原文
