Hello all:
I've been given the following data and have been asked to run a logit
model using glm(). The variable, Y, is a proportion ranging from 0 to
1, X is a covariate. Without a base number of observations from which Y
is computed as a proportion, I believe there is not sufficient information.
If I try the model below, R seems to grumble with a complaint.
glm(cbind(Y,1-Y) ~ X, family = binomial)
non-integer counts in a binomial glm! in: eval(expr, envir, enclos)
Am I correct to believe that more information is required?
Thanks,
ANDREW
Y X
[1,] 0.40 41
[2,] 0.19 69
[3,] 0.20 60
[4,] 0.29 85
[5,] 0.14 48
[6,] 0.20 32
[7,] 0.11 69
[8,] 0.28 17
[9,] 0.35 115
[10,] 0.03 15
[11,] 0.14 11
[12,] 0.12 25
On Sun, 28 Sep 2003, Andrew Criswell wrote:> Hello all: > > I've been given the following data and have been asked to run a logit > model using glm(). The variable, Y, is a proportion ranging from 0 to > 1, X is a covariate. Without a base number of observations from which Y > is computed as a proportion, I believe there is not sufficient information. > > If I try the model below, R seems to grumble with a complaint. > > glm(cbind(Y,1-Y) ~ X, family = binomial) > > non-integer counts in a binomial glm! in: eval(expr, envir, enclos) > > Am I correct to believe that more information is required?Yes, probably. If they are proportions without a well-defined denominator you may be able to model them using family=quasi() and specifying the link and variance function for a logistic regression model. You'd need to look at what the variance function actually is, though. McCullagh & Nelder's book has an example using proportions of leaf damage that's a bit like this, although they end up using (mu(1-mu))^2 as the variance function. -thomas
> > If I try the model below, R seems to grumble with a complaint. > > > > glm(cbind(Y,1-Y) ~ X, family = binomial) > > > > non-integer counts in a binomial glm! in: eval(expr, envir, enclos) > >For binomial models (as described in the help page), the response must be either a factor or a n x 2 matrix with the numbers of successes of failures, not the proportions. g., David