On Sat, 19 Sep 2009, Axel Urbiz wrote:
> Hi All,
>
> My dependent variable is a ratio that takes a value of 0 (zero) for 95% of
> the observations and positive non-integer values for the other 5%. What
> model would be appropriate? I'm thinking of fitting a GLM with a
Poisson ~.
> Now, becuase it takes non-integer values, using the glm function with
> Poisson family issues warning messages.
If it is a ratio of (integer-valued) counts in the numerator and some
known denominator, say
ratio = count/denom
then one standard approach would be to fit
glm(count ~ ..., offset = log(denom), data = ..., family = poisson)
because this corresponds to
log(count) = x'beta + log(denom)
<=> log(count/denom) = x'beta
To address the excess zeros, you could use a hurdle model or a
zero-inflated model. See
http://www.jstatsoft.org/v27/i08/
Best,
Z
> Warning messages:
> 1: In dpois(y, mu, log = TRUE) : non-integer x = 0.430783
> 2: In dpois(y, mu, log = TRUE) : non-integer x = 0.162519
> 3: In dpois(y, mu, log = TRUE) : non-integer x = 0.162519
> 4: In dpois(y, mu, log = TRUE) : non-integer x = 0.162519
> 5: In dpois(y, mu, log = TRUE) : non-integer x = 0.371564
>
> I'll appreciate your thoughts.
>
> Thanks!
>
> Axel.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> 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.
>
>