Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Zero Trunctated and One inflated Poisson

From   Giorgio Ricchiuti <>
Subject   st: Zero Trunctated and One inflated Poisson
Date   Fri, 16 Mar 2007 17:12:09 +0100

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


* For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index