[R] regression with proportion data
rroa at azti.es
Mon Mar 19 15:27:26 CET 2012
Your response variable is not binomial, it's a proportion.
Try the betareg function in the betareg package, which more correctly assumes that your response variable is Beta distributed (but beware that 1 and 0 are not allowed). The syntax is the same as in a glm.
De: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] En nombre de Georgiana May
Enviado el: lunes, 19 de marzo de 2012 15:06
Para: r-help at r-project.org
Asunto: [R] regression with proportion data
I want to determine the regression relationship between a proportion (y) and a continuous variable (x).
Reading a number of sources (e.g. The R Book, Quick R,help), I believe I should be able to designate the model as:
this runs but gives me error messages:
In eval(expr, envir, enclos) : non-integer #successes in a binomial glm!
If I transform the proportion variable with log, it doesn't like that either (values not: 0<y<1)
I understand that the binomial function concerns successes vs. failures and can use those raw data, but the R Book and other sources seem to suggest that proportion data are usable as well. Not so?
[[alternative HTML version deleted]]
R-help at r-project.org mailing list
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