Hello All,
I am trying to model a Multivariate Probit Regression (Trivariate to be precise) with one sample selection, very much like the model (Cappellari et. al. 2006) and using David Roodman's CMP plugin. One might ask why I am not using the Cappellari Jenkins mvnp, mdraws technique?, because I am having a lot of problem with convergence. But somehow my model converged with cmd, and hence I wanted to check if my specification in cmd was correct for my model.
My model
Trivariate Probit model with selection. Three outcomes of interest: Self Report Disease, Agree to Participate in Medical Test, Has disease. Everyone gets to Self Report Disease. Some agree to participate in Medical Test, and only these respondents gets a diagnosis of either having/not having a disease.
My cmp code is as follows,
I had to use bhhh, as nr "cannot compute an improvement -- discontinuous region encountered" and convergence was not achieved. I must say that this group of $cov is something I have played with for over 30 hours because of the combination of discontinuous and not-concave errors I was getting. As you can see in some of the categories, the sample sizes are getting pretty low, and I was asking too much from the data. It finally ran with the above code with a couple of warnings saying it being ill-conditioned. I can live with that since there are quite a few dummies in $cov.
I would be grateful if someone could confirm that the code is correct for the above model, otherwise, because of my nihilism, I will just assume that I have made an error and probably fitted some other model.
FYI this was my mvnp/mdraws code that didn't converge
Thanks a Lot
Soumya
I am trying to model a Multivariate Probit Regression (Trivariate to be precise) with one sample selection, very much like the model (Cappellari et. al. 2006) and using David Roodman's CMP plugin. One might ask why I am not using the Cappellari Jenkins mvnp, mdraws technique?, because I am having a lot of problem with convergence. But somehow my model converged with cmd, and hence I wanted to check if my specification in cmd was correct for my model.
My model
Trivariate Probit model with selection. Three outcomes of interest: Self Report Disease, Agree to Participate in Medical Test, Has disease. Everyone gets to Self Report Disease. Some agree to participate in Medical Test, and only these respondents gets a diagnosis of either having/not having a disease.
My cmp code is as follows,
Code:
cmp (krephbp = $cov) (kagrhbp = $cov i.k026) (khashbp = $cov i.bmicat) , ind($cmp_probit $cmp_probit kagrhbp*$cmp_probit) technique(bhhh)
I would be grateful if someone could confirm that the code is correct for the above model, otherwise, because of my nihilism, I will just assume that I have made an error and probably fitted some other model.
FYI this was my mvnp/mdraws code that didn't converge
Code:
program define myll args lnf x1 x2 x3 c21 c31 c32 tempvar sp2 sp3 k1 k2 k3 quietly { gen double `k1' = 2*$ML_y1 - 1 gen double `k2' = 2*$ML_y2 - 1 gen double `k3' = 2*$ML_y3 - 1 tempname cf21 cf22 cf31 cf32 cf33 C1 C2 su `c21', meanonly scalar `cf21' = r(mean) su `c31', meanonly scalar `cf31' = r(mean) su `c32', meanonly scalar `cf32' = r(mean) scalar `cf22' = sqrt(1 - `cf21'^2) scalar `cf33' = sqrt(1 - `cf31'^2 - `cf32'^2) mat `C1' = ( 1, 0, 0 \ `cf21', `cf22', 0 \ `cf31', `cf32', `cf33' ) mat `C2' = ( 1, 0 \ `cf21', `cf22' ) egen `sp3' = mvnp(`x1' `x2' `x3') if $ML_y1==1, chol(`C1') dr($dr) prefix(z) sign(`k1' `k2' `k3') egen `sp2' = mvnp(`x1' `x2' ) if $ML_y1==0, chol(`C2') dr($dr) prefix(z) sign(`k1' `k2' ) replace `lnf' = cond($ML_y1==1, ln(`sp3'), ln(`sp2'), .) } ml model lf myll (kagrhbp: kagrhbp = $cov i.k026 ) (krephbp: krephbp = $cov) (khashbp: khashbp = $cov i.bmicat) /c21 /c31 /c32, technique (bhhh) ml init b0 ml maximize, iterate(150) difficult end
Soumya
Comment