楼主: hiderm
14495 15

[回归分析求助] 求助:双重样本选择模型如何在stata中实现 [推广有奖]

院士

51%

还不是VIP/贵宾

-

威望
1
论坛币
56966 个
通用积分
3907.1789
学术水平
253 点
热心指数
329 点
信用等级
219 点
经验
74521 点
帖子
2123
精华
1
在线时间
2665 小时
注册时间
2006-6-3
最后登录
2024-2-23

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
举例:科技型中小企业与私募股权(PE)投资者就投资事宜的决策可分为三个阶段

stage 1 科技型企业选择是否向PE投资者申请股权融资:first 选择模型

stage 2 在科技型企业提出股权融资申请的条件下,PE投资者经过甄别决定是否对科技型企业进行股权投资:second选择模型

stage 3 在企业提出股权融资申请 且 PE投资者决定投资的条件下,PE投资者确定对企业的股权投资额度:普通的线性回归模型

在stata中,我只看到了对两阶段选择模型给出的方法:heckprob,但是我要研究的议题是三个阶段的决策,包含两个选择过程,
这样的模型如何在stata中实现呢?

补充:经过这段时间的学习,根据已有文献的介绍,前两个阶段应该采用双变量probit模型,而第三阶段的普通线性回归模型中应当加入选择性偏误的修正项。



二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:样本选择模型 Stata 选择模型 tata 样本选择 模型 样本 如何

[b][color=Red]提请应助者注意:请不要上传draft或者wp版本,谢谢!因为这些版本我自己用谷歌搜索就可以搜到并免费下载
沙发
hiderm 发表于 2013-3-24 20:09:05 |只看作者 |坛友微信交流群

Re: st: binomial probit with double sample selection  by Stephen

See discussion of a range of multivariate probit models, see
L. Cappellari and S. P. Jenkins, "Calculation of multivariate normal probabilities by simulation, with applications to maximum simulated likelihood estimation". The Stata Journal, 6 (2), June 2006, 156-189
There are a number of worked examples, including one with multipleselections


SJ2006v6n2-Calculation of multivariate normal probabilities by simulation, with applications to maximum simulated likelihood estimation


[b][color=Red]提请应助者注意:请不要上传draft或者wp版本,谢谢!因为这些版本我自己用谷歌搜索就可以搜到并免费下载

使用道具

藤椅
hiderm 发表于 2013-3-24 21:47:38 |只看作者 |坛友微信交流群
st: ML model with sequential sample selection
http://www.stata.com/statalist/archive/2007-03/msg00055.html

Dear all,

I'm estimating the following model:

I1*=Z1d1+e1
I2*=Z2d2+e2 (observed if I1*>0)
Y=Xb+u (observed if I1*>0 and I2*>0)

where (e1,e2,u) are trivariate normal. In terms of ML there are 3 contributions: P(e1<-Z1d1), P(e2<-Z2d2,e1<Z1d1) and f(Y|e1<Z1d1,e2<Z2d2)=P(e1<Z1d1,e2<Z2d2|u)*f(u)

First, I estimate this model using the Heckman's two-step approach and use the estimates as starting values for the full ML model
The problem is that the Ml is not accepting the starting values of the correlation parameters (it returns error r(491)). Also, the ML model is converging to very extreme  values of the correlation parameters.
Can anyone take a look at the program and tell me whether I disregarded something? Thanks a lot!



capture program drop experim_lf
program experim_lf
    version 9.2
    args lnf z1d1 z2d2 xb sigma rho12 rho1u rho2u
    tempvar u cum1 cum2 rho
    quietly {
        scalar `rho12'=0
        gen double `u'=$ML_y3-`xb'
        gen double `cum1'=((`z1d1'-`u'*`rho1u'/`sigma')/sqrt(1-`rho1u'^2))   
        gen double `cum2'=((`z2d2'-`u'*`rho2u'/`sigma')/sqrt(1-`rho2u'^2))
        gen double `rho'=`rho12'-`rho1u'*`rho2u'
                    
        replace `lnf'=ln(normal(-`z1d1')) if $ML_y1==0                        

        replace `lnf'=ln(binormal(`z1d1',-`z2d2',-`rho12')) if $ML_y2==0

        replace `lnf'=ln(binormal(`cum1',`cum2',`rho'))+ln(normalden(`u',0,`sigma')) if $ML_y2==1
                           
        }
end



--

Geraldo


Re: st: ML model with sequential sample selection
http://www.stata.com/statalist/archive/2007-03/msg00060.html

so why are you resetting rho12 to zero in the first essential line there?

On 3/2/07, Geraldo Cerqueiro <G.M.Cerqueiro@uvt.nl> wrote:

                    scalar `rho12'=0

--
Stas Kolenikov


[b][color=Red]提请应助者注意:请不要上传draft或者wp版本,谢谢!因为这些版本我自己用谷歌搜索就可以搜到并免费下载

使用道具

板凳
hiderm 发表于 2013-3-24 21:53:56 |只看作者 |坛友微信交流群
st: maximum  likelihood estimation weibull model with sample selectionhttp://www.stata.com/statalist/archive/2005-02/msg00414.html

Hello,

I am trying to model a weibull model with sample selection in stata 8.2.
My problem is that Stata produces unsatisfactory output. I have the
feeling that rounding in the maximization routines contribute to these
results but I am not sure. I provide the output from my do-file.

sysuse cancer, clear
(Patient Survival in Drug Trial)

.
. gen drug2 = drug == 2

. gen drug3 = drug == 3

.
.
. /*
> WEIBULL MODEL WITH SAMPLE SELECTION FROM RIGHT TRUNCATED SPELL DATA
(OUTFLOW SAMPLE)
>
> The likelihood for this model is given by
>
> (1) L = f(t) / F(t)                             (control for a
overrepresentation of short spells relative to long spells)
>
> with weibull density function (see Maximum Likelihood Estimation with
Stata (2nd edition), 2004: page 221)
>
> f(t; e, g) = (e/g) *(t/e)^(g-1) * exp(-(t/e)^g
>
> and failure function
>
> F(t; e, g) = 1 -  exp(-t/e)^g
>
> with parameters  (gamma) g and (eta) e=exp(Xb)
> */
.
. capture program drop myweibull_sampleselection_lf

.
. program myweibull_sampleselection_lf
  1.         version 8.1
  2.         args lnf leta lgam
  3.         tempvar p M R
  4.         quietly         {
  5.                         gen double `p'  = exp(`lgam')
  6.                         gen double `M' = ($ML_y1*exp(-`leta'))^`p'
  7.                         gen double `R' = ln($ML_y1)-`leta'
  8.                         replace `lnf' =   -`M' + $ML_y2 * (`lgam' -
`leta' + (`p'-1) * `R') - ln(1-(exp(-`M')))
  9.                 }
10. end

.
.
. ml model lf myweibull_sampleselection_lf (lneta: studytime died =
drug2 drug3 age)/ lngamma

.
. ml maximize

initial:       log likelihood =  -742.8257
alternative:   log likelihood = -355.05562
rescale:       log likelihood = -192.23867
rescale eq:    log likelihood =  452.20041
Iteration 0:   log likelihood =  452.20041  (not concave)
Iteration 1:   log likelihood =  452.31598  (not concave)
Iteration 2:   log likelihood =  452.35131  (not concave)
Iteration 3:   log likelihood =  452.35485  
Iteration 4:   log likelihood =  452.36837  (not concave)
Iteration 5:   log likelihood =  452.36972  (not concave)
Iteration 6:   log likelihood =  452.36999  (not concave)
numerical derivatives are approximate
flat or discontinuous region encountered
numerical derivatives are approximate
nearby values are missing
Iteration 7:   log likelihood =  452.37005  (not concave)
numerical derivatives are approximate
flat or discontinuous region encountered
numerical derivatives are approximate
flat or discontinuous region encountered
Iteration 8:   log likelihood =  452.37005  (not concave)
numerical derivatives are approximate
flat or discontinuous region encountered
numerical derivatives are approximate
flat or discontinuous region encountered



I would really appreciate anyone's ideas about this issue.

Best regards,

Jasper Kok
Ph-D student
Maastricht University
Netherlands



[b][color=Red]提请应助者注意:请不要上传draft或者wp版本,谢谢!因为这些版本我自己用谷歌搜索就可以搜到并免费下载

使用道具

报纸
hiderm 发表于 2013-3-24 21:59:10 |只看作者 |坛友微信交流群
Stata FAQs >> Mills’ ratios & censoring direction in Heckman
Why are there so many formulas for the inverse of Mills’ ratio?http://www.stata.com/support/faqs/statistics/inverse-mills-ratio/



[b][color=Red]提请应助者注意:请不要上传draft或者wp版本,谢谢!因为这些版本我自己用谷歌搜索就可以搜到并免费下载

使用道具

地板
hiderm 发表于 2013-3-24 23:39:26 |只看作者 |坛友微信交流群
STATA FAQ >> Endogeneity versus sample selection bias

What is the difference between “endogeneity” and “sample selection bias”?

http://www.stata.com/support/faq ... ple-selection-bias/
[b][color=Red]提请应助者注意:请不要上传draft或者wp版本,谢谢!因为这些版本我自己用谷歌搜索就可以搜到并免费下载

使用道具

7
hiderm 发表于 2013-3-25 15:41:22 |只看作者 |坛友微信交流群
[b][color=Red]提请应助者注意:请不要上传draft或者wp版本,谢谢!因为这些版本我自己用谷歌搜索就可以搜到并免费下载

使用道具

8
hiderm 发表于 2013-3-25 15:55:37 |只看作者 |坛友微信交流群
[b][color=Red]提请应助者注意:请不要上传draft或者wp版本,谢谢!因为这些版本我自己用谷歌搜索就可以搜到并免费下载

使用道具

9
hiderm 发表于 2013-3-25 19:27:19 |只看作者 |坛友微信交流群
SelectionBias Corrections Based on the Multinomial Logit Model
Statacommand: selmlog (version 13, august 2006)

http://www.parisschoolofeconomics.com/gurgand-marc/selmlog/selmlog13.html


http://www.parisschoolofeconomics.com/gurgand-marc/selmlog/selmloghelp.pdf


Questions about selmlog and svyselmlog        

http://statalist.1588530.n2.nabble.com/Questions-about-selmlog-and-svyselmlog-td5651985.html
[b][color=Red]提请应助者注意:请不要上传draft或者wp版本,谢谢!因为这些版本我自己用谷歌搜索就可以搜到并免费下载

使用道具

10
hiderm 发表于 2013-3-25 20:28:39 |只看作者 |坛友微信交流群
st: calculation of bivariate normal probabilities
http://www.stata.com/statalist/archive/2005-05/msg00696.html


Re: st: calculation of bivariate normal probabilities
http://www.stata.com/statalist/archive/2005-05/msg00700.html

[b][color=Red]提请应助者注意:请不要上传draft或者wp版本,谢谢!因为这些版本我自己用谷歌搜索就可以搜到并免费下载

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-19 17:23