Dear listfolk,
I am struggling with a zero-inflated density surface model (DSM) built using the new ziplss() response.
The model is of the form:
zipdsm(list(N~s(x,y, m=c(1,.5)),~s(depth, m=1)+s(shore, m=1)),
det.hn.cos2$ddf,
seg.data,
obs.data[obs.data$distance<=250,],
family=ziplss())
Where the probability of presence is modelled as a function of both depth and distance from shore (in line with existing biological knowledge about the species) and the Poisson component is modelled as a bivariate smooth of x and y (transformed lat/lon).
zipdsm is a modified version of the dsm function tweaked to accomodate a formula in two parts as shown above.
The model runs smoothly and gives me a sensible abundance estimate.
However, I am facing two problems:
(1) ziplss returns warning messages to inform me that offsets are ignored.
1: In estimate.gam(G, method, optimizer, control, in.out, scale, gamma, :
sorry, general families currently ignore offsets
Given the importance of including segment areas as offsets, I am worried about this - but unsure how to work around it?
(2) I tried adapting the dsm.var.prop/dsm.var.gam to suit my zero-inflated model but without success.
I think I may be failing to properly retrieve/code the inverse link function, as it is a two-stage model.
There may also be issues with offsets if ziplss disregards them when they're needed.
Does anyone know how to solve this?
I have tried a quasipoisson model but it is greatly overdispersed and the residuals look terrible.
I also tried a negative binomial but I don't trust it. Although the residuals plots look better, the abundance estimates are through the roof and the predictive surface, when mapped, does not match sightings well. In addition, Zuur et al. (Zero Inflated models and generalized linear mixed models in R, p78) suggest that negative binomial models may return biased estimates in the presence of zero-inflation. This would explain the "weird" predictions I get with this model.
It is therefore critical that I try and make the ZI work.
Any inputs, thoughts, or advice will be immensely appreciated.
Thanks in advance,
Phil