Statalist


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

Re: st: ordered probit with sample selection


From   [email protected]
To   [email protected]
Subject   Re: st: ordered probit with sample selection
Date   Sat, 26 Apr 2008 11:13:59 +0200

Late 2-cents opinion: I am not good enough to look at your code and tell you what's wrong - if any!!!
Let me recap: you have probit at first stage and ordered probit at second stage. What about downloading -ssm- from SSC? -ssm- is a wrapper for -gllamm- to estimate Endogenous-Switch & Sample Selection Count, Binary & Ordinal Response Regression by maximum likelihood using adaptive quadrature (one equation estimates the likelihood of being selected or observed using a probit specification, while in the second stage a GLM is run). Please note that the command may require much time to converge.
Warning: I didn't set Statalist-disturbing automatic replies. Thus please note in advance that I will be offline for the next 8 days at least, and thus unable to continue this discussion for a while.
Nicola

At 02.33 22/04/2008 -0400, "Dario Pozzoli" wrote:
>Dear all,
>
>I m trying to estimate the likelihood function of the ordered probit
>model with sample selection.
>
>In the first step I have the participation equation in the second I
>have sector choice (agriculture, formal, informal). The exclusion
>restriction is non labour income.
>
>I think there is a mistake in my code because after ml maximize the
>likelihood function is not concave, even though the model is very
>simple.
>
>Here it is my code. Could you help in finding the mistake?
>
>capture program drop myll
>program define myll
>        version 6.0
>      args lnf I1 I2 rho m1  m2
>
>        quietly replace `lnf' = ln(normprob(-`I1')) if $ML_y1==0
>      quietly replace `lnf' = ln(binorm(`m1'-`I2',`I1', `rho' )) if
>$ML_y1==1 & $ML_y2==1
>      quietly replace `lnf' = ln(binorm(`m2'-`I2', `I1',`rho')- /*
>                */ binorm(`m1'-`I2', `I1', `rho')) if $ML_y1==1 & $ML_y2==2
>      quietly replace `lnf' = ln(1- binorm(`m2'-`I2', `I1',`rho')) if
>$ML_y1==1 & $ML_y2==3
>
>end
>
>
>ml model lf myll  (participation: participation=$cntrlp) (choice4:
>choice4 =$cntrlc, nocons)   /rho /m1  /m2
>
>ml init b
>ml maximize, difficult 

*
*   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