[R-sig-eco] ZINB or density data models with lots of zeros

Peter Solymos solymos at ualberta.ca
Thu Mar 11 17:22:38 CET 2010


Trevor,

You can use weights in the model to provide the surface area (or
sqrt(surface area) to enhance linearity) and leave the counts as they
are in the ZINB model. (In the zeroinfl function weights are used to
weight the log-likelihood and to scale the residuals.)

Cheers,

Peter

Péter Sólymos
Alberta Biodiversity Monitoring Institute
and Boreal Avian Modelling project
Department of Biological Sciences
CW 405, Biological Sciences Bldg
University of Alberta
Edmonton, Alberta, T6G 2E9, Canada
Phone: 780.492.8534
Fax: 780.492.7635


On Thu, Mar 11, 2010 at 9:03 AM, tavery <trevor.avery at acadiau.ca> wrote:
> I have completed zero-inflation negative binomial (ZINB) models on count
> data for the absolute counts of ectoparasites on fish where there are lots
> of zeros (everything worked well using Zuur et al. and a host of other
> sources). The fish are of different sizes with corresponding differences in
> surface areas of fins etc. and I would now like to compare density of
> parasites among each area. Densities were calculated by dividing the counts
> for each parasite by the surface area of the fin (etc.) and surface areas
> were different for each individual i.e. scaled for size of fish.
>
> The comparisons are then of non-integer values that do not play nice with
> Poisson or Negative Binomial models. However, the issue of having lots of
> zeros remains and will affect mean values if I were to use some sort of
> ANOVA based analysis.
>
> Does anyone have any suggestions on how to deal with the many zeros for the
> density data (assuming I was to use an ANOVA type analysis)? I have also
> thought to just include fish size as a covariate in the ZINB models, but a)
> have not seen an example of such, b) do not want to over complicate the
> analysis, and/or c) this will only scale the counts to overall fish size,
> not to fin etc. surface areas. Of course, fin surface areas probably scale
> linearly and, if so, body size might be an appropriate covariate to remove
> the effect from the ZINB comparisons of counts on fins i.e. essentially the
> same comparison (density = ZINB with fish size covariate). Does that make
> sense?
>
> This ZINB model works well (yes, the 'false' zeros are independent of
> factors hence the "| 1"). Where would I insert the fish size covariate?
> location_on_body = where parasites were found (7 body areas)
> location = site of fish capture (2 sites)
>
> zinb2<-zeroinfl(caligus_elongatus~location_on_body+location | 1,
> dist="negbin", link="logit", data=sturg)
>
> I would assume this:
>
> zinb2<-zeroinfl(caligus_elongatus~fish_size+location_on_body+location | 1,
> dist="negbin", link="logit", data=sturg)
>
> thanks in advance,
> trevor
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
>



More information about the R-sig-ecology mailing list