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

st: ordered probit with sample selection

From   "Dario Pozzoli" <>
To   statalist <>
Subject   st: ordered probit with sample selection
Date   Mon, 21 Apr 2008 17:47:13 +0200

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

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


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:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index