Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Pavlos C. Symeou" <p.symeou@lmu.de> |
To | statalist@hsphsun2.harvard.edu |
Subject | st: Zero-inflated Negative Binomial models for Panel data |
Date | Tue, 13 Jul 2010 17:42:54 +0200 |
I first followed the suggestion made in the thread to look at the paper "From the help desk: hurdle models" by Allen McDowell, published in The Stata Journal (2003) 3, Number 2, pp. 178–184. What the paper illustrates is how to fit a hurdle model using ml’s cluster(), options.
The commands are the following: program hurdle_ll version 8 args lnf beta1 beta2 tempvar pi lambda quietly generate double ‘pi’ = exp(‘beta1’) quietly generate double ‘lambda’ = exp(‘beta2’) quietly replace ‘lnf’ = cond($ML_y1==0,-‘pi’, /// log(1-exp(-‘pi’)) + $ML_y1*‘beta2’ - /// log(exp(‘lambda’)-1) - lngamma($ML_y1+1)) end You can then invoke the ml estimator with the commands: ml model lf hurdle_ll (y = x1 x2) (x1 x2) ml max, nologMy question is the following: can I suggest that I am estimating or approach an estimation of a panel data respective model if I cluster based on each observation's identity (id) and introduce year dummies as regressors?
Namely, the ml estimator would look like this:xi: ml model lf hurdle_ll (y = x1 x2 i.year) (x1 x2 i.year), cluster(id)
ml max, nolog I look forward to receiving your insights. Best, Pavlos * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/