Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 |

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, nolog

Namely, the ml estimator would look like this:

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/

- Prev by Date:
**AW: st: max length of 244 characters** - Next by Date:
**Re: AW: st: max length of 244 characters** - Previous by thread:
**st: max length of 244 characters** - Next by thread:
**st: saving regression results in matrix** - Index(es):