I am trying to learn how to use mdraws by Cappellari and Jenkins.When replicating the example test_trial_dta_100.do,an error accuered after the step ml maximize. the code as blow: *! version 1.0.0 27apr2006 clear all set more off cap log close * cd d:\home\stephenj\MYProjects\cappellari\egen\plugin \sj3 // cd log using test_trial_dta_100.log,replace ********* test_trial_dta_100 ********************** * * Three binary outcomes, one of which is incidentally truncated * * 100 halton draws, with antithetics * ************************************************** * which _gmvnp which mdraws use trial ta lph20 flph20, missing // gets initial values quietly{ probit retent1 female eta eta2 mat b1 = get(_b) mat coleq b1 = retent1 // Reset column names of matrix probit lph20 female eta eta2 mat b2 = get(_b) mat coleq b2 = lph20 probit flph20 female eta eta2 mat b3 = get(_b) mat coleq b3 = flph20 mat b0 = b1, b2, b3 } ********************** * PLUGIN & antithetics ********************** set rmsg on //Return messages mdraws, dr(100) neq(3) prefix(z) burn(10) antithetics set rmsg off global dr = r(n_draws) capture program drop myll 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) // constraints on diagonal elements 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) signs(`k1' `k2' `k3') egen `sp2' = mvnp(`x1' `x2' ) if $ML_y1==0, /// chol(`C2') dr($dr) prefix(z) signs(`k1' `k2') replace `lnf'= ln(`sp3') if $ML_y1==1 replace `lnf'= ln(`sp2') if $ML_y1==0 } end ml model lf myll (retent1: retent1 = female eta eta2) /// (lph20: lph20 = female eta eta2) /// (flph20: flph20 = female eta eta2) /// /c21 /c31 /c32 /// , missing title("3-var probit, 1 selection, MSL, $dr Halton draws") ml init b0 set rmsg on ml maximize set rmsg off everything is fine until: . ml maximize plugin not loaded or not available: use the adoonly option
Anyone can help me understand why this happen?Thanks a lot.
Related Posts with An error "plugin not loaded or not available: use the adoonly option" accur after "ml maximize"
The robust standard error in a fixed effects modelHi I have a question about the vce(robust) option. (the option is same with vce(cluster pid) in xtre…
Merging rows that have identical namesDear all, I have been struggling with the following issue. My dataset is basically like in the table…
Compare the distributions of two variablesI would like to compare the distributions of two variables: guess_attain_own_treatment and guess_att…
Power calculations for clustered designs & multiple survey roundsHello, does anyone know how to conduct power calculations that account for both clustered designs an…
Weak instrument issue with control function approach, in nonlinear modelsDear all, I'm applying the control function (CF) approach in a nonlinear model, the fractional resp…
Subscribe to:
Post Comments (Atom)
0 Response to An error "plugin not loaded or not available: use the adoonly option" accur after "ml maximize"
Post a Comment