BookmarkSubscribeSubscribe to RSS Feed

zero-inflated poisson distribution in a generalized linear model


Community Member


Jul 17, 2013

Is there a way to specify a zero-inflated poisson distribution (error structure) to a generalized linear model in the Fit Model platform?  I see I can specify normal, binomial, poisson, and exponential distributions; but what I need is a zero-inflated poisson distribution...  Any help greatly appreciated.  Thanks.


Community Trekker


Jun 23, 2011

I don't know of a way to fit a ZI model of any type automatically.  I have always fit two part models, one part to model 0 or not 0 and a second to model the not 0 portion, then combined the models.


Community Trekker


Oct 16, 2012

Clay Barker has a nice ZIPoisson example on the JMP File exchange..

// set up the ZIP negative log likelihood with the starting values defined above

Exform = expr(

ll << set formula(Parameter(

    {p = expr(pstart), lambda = expr(lstart)},

    If( :Y == 0,

        -Log( p + (1 - p) * Exp( -lambda ) ),


            (1 - p) * ((Exp( -lambda ) * lambda ^ :Y) /

            Factorial( :Y ))




// now plug the starting values into the negative log likelihood column

eval(eval Expr(exform));

// use nonlinear to minimize the negative log likelihood, which is equivalent to maximizing the likelihood

nl = Nonlinear(

    Loss( :NegLogLik ),

    Loss is Neg LogLikelihood( 1 ),