[R] R wont accept my zero count values in the GLM with quasi_poisson dsitribution
Michael Friendly
friendly at yorku.ca
Tue Jul 28 15:23:33 CEST 2015
On 7/28/2015 3:05 AM, Göran Broström wrote:
>
>
> On 28/07/15 08:33, Charlotte wrote:
>> Hello
>>
>> I have count values for abundance which follow a pattern of
>> over-dispersal with many zero values. I have read a number of
>> documents which suggest that I don't use data transforming methods
>> but rather than I run the GLM with the quasi poisson distribution.
>> So I have written my script and R is telling me that Y should be more
>> than 0.
>
> No, R is telling you that you must have 0 <= y <= 1 (see below).
> For count data you should not use the binomial family, but rather
> 'poisson', or 'quasipoisson'.
With excess zeros, overdispersion is the symptom, but the quasipoisson
model is not the cure.
Even better than quasipoisson would be to use a ZIP (zero-inflated
poisson) model or a hurdle model to explicitly model the
excess zeros.
These are handled by the countreg package, at present only
available on R-Forge.
install.packages("countreg", repos="http://R-Forge.R-project.org")
>
>> ______________________________________________ R-help at r-project.org
>> mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the
>> posting guide http://www.R-project.org/posting-guide.html and provide
>> commented, minimal, self-contained, reproducible code.
>>
>
More information about the R-help
mailing list