[R-sig-ME] Mixed effect model, Hurdle function

Ben Bolker bbolker at gmail.com
Fri Nov 18 15:38:20 CET 2016

  This isn't really a "mixed effect model" in the standard terminology
(there's no random effect). Nevertheless ...

On 16-11-17 11:29 PM, Pin chanratana wrote:
> Hi everyone here,
> My name's Ratana, and I'm a Msc. student studying conservation ecology.
> I'm new to the using of mixed effects model. I try to fit the mixed effect
> models include an offset term (which is trapnight)  of my camera-trap data
> by using hurdle function. The following are the model that I fit.
> m1 <- hurdle(GI ~
> depth+Ele+dRoad+offset(log(TN))|depth+Ele+offset(log(TN)), data=ndata2,
> dist="poisson", zero.dist="poisson")
> m2 <- hurdle(GI ~ depth+Ele+dRoad+offset(TN2)|depth+Ele+offset(TN2),
> data=ndata2, dist="poisson", zero.dist="poisson")

  I'm unfamiliar with models that use the censored Poisson for their
hurdle model (binomial is more standard in my experience), but whatever.

> GI: Giant ibis
> depth: depth of waterholes
> Ele: Elevation
> dRoad: distance to Road
> TN: Trap-night
> TN2: standardize or scale of Trap-night
> But, I could not fit model m1 and there are error message: Error in
> glm.fit(X, Y, family = poisson(), weights = weights, offset = offsetx) :
> NA/NaN/Inf in 'y'
> Model m2 is work fine and the result look reasonable.

  Your first model looks more correct/standard; log(exposure) is the
standard offset in a Poisson count model.  (Not as clear what to use as
an offset for the hurdle; I would actually say that a log-exposure
offset with a complementary log-log link would actually make the most
sense for a binomial, but I haven't thought about how that would go
together with a censored Poisson ...)

  Is it possible that you have some observations in your data with TN=0?
That would cause the first model to fail. (It wouldn't really make
sense, but I've seen observational data like this where the person
taking the data rounded down to zero trap-nights.)

  Could you please send follow-up questions, if any, to
r-sig-ecology at r-project.org ?

> I would like to ask if anyone know, is the way I do with model 2 is correct
> by standardize the Trap-night that's use for offset in the fitting model?
> If it's ok to do so, is there any reference (that I can cite) regarding to
> this kind of process ?
> Regards,
> Ratana
> 	[[alternative HTML version deleted]]
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

More information about the R-sig-mixed-models mailing list