| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Zero Trunctated and One inflated Poisson
Dear All,
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
follows:
mlsum `lnf' = cond($ML_y1 == 1 ,
ln(1/(1+exp(-`zg')) +
1/(1+exp(`zg'))*exp(-exp(`xb'))),
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
Giorgio
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/