[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Zero Trunctated and One inflated Poisson
I have been modelling the number of affiliates that the firm i has in
the country j. My data are zero-truncated but unfortunately are even
one-inflated (75% of cases). I did not find any possibility to analyse
this mix-model in STATA 9.0 (neither using for example zip or ztp). I
worked out the maximum likelihood, and I changed the adofile of zip as
mlsum `lnf' = cond($ML_y1 == 1 ,
ln(1/(1+exp(`zg'))) - 2*exp(`xb') + `xb'*$ML_y1 -
lngamma($ML_y1+1) ) ;
Of course I also changed gradient and hessian but, unfortunately, I am
not a developer, hence I did some mistake.
Does anyone help me, explaining either how to change the maximum
likelihood correctly or developing the model directly in Stata?
Thanks a lot
* For searches and help try: