Dear Stata users,
I am running the below code to get box-cox double hurdle model( I got the codes from the paper published and told my stata user). I got the following message
invalid evaluator type
r(3498);
Could you please help me how to use this problem?
global listy x1 x2 x3 x4 x5
global listd x1 x2 x3
program define d_h
version 14
args Inf thetal theta2 theta3 theta4
tempvar d p z p0 pll yt
quietly gen double `d'= $ML_yl >0
quietly gen double `p'= normprob(`theta3')
quietly gen double `1'= `theta4'
quietly gen double `yt'= ($MLyl^`I'-1)/`l'
quietly gen double `z'= (`yt'-`thetal ')/(`theta2')
quietly gen double `pO'= 1-(`p'*normprob(-`z'))
quietly gen double `pl' = (($ML_yl + (1-`d'))^ (`T'-1))*`p'*normd(`z')/`theta2'
quietly replace `lnf' = ln((1-`d')*`p0' + `d'*`pl')
end
ml model If d_h (yt=`listy') () (yt=`listd') ()
ml init b, copy
ml maximize
I am running the below code to get box-cox double hurdle model( I got the codes from the paper published and told my stata user). I got the following message
invalid evaluator type
r(3498);
Could you please help me how to use this problem?
global listy x1 x2 x3 x4 x5
global listd x1 x2 x3
program define d_h
version 14
args Inf thetal theta2 theta3 theta4
tempvar d p z p0 pll yt
quietly gen double `d'= $ML_yl >0
quietly gen double `p'= normprob(`theta3')
quietly gen double `1'= `theta4'
quietly gen double `yt'= ($MLyl^`I'-1)/`l'
quietly gen double `z'= (`yt'-`thetal ')/(`theta2')
quietly gen double `pO'= 1-(`p'*normprob(-`z'))
quietly gen double `pl' = (($ML_yl + (1-`d'))^ (`T'-1))*`p'*normd(`z')/`theta2'
quietly replace `lnf' = ln((1-`d')*`p0' + `d'*`pl')
end
ml model If d_h (yt=`listy') () (yt=`listd') ()
ml init b, copy
ml maximize
Comment