To whom this may concern,

I would be very grateful if someone could give me some advice on where I am going wrong with a logistic regression I am trying to run. I am trying to run a logistic regression on an aggregated data set and have input the command:
 
logistic.mod<-glm(x~Frequency+Location+Sex+Age.Group,family=binomial(link="logit"),data=earsag1.dat)

where x is the count of my response and frequency, location, sex and age.group are other variables. However, R gives an error because my values of x are not between 0 and 1. Therefore to compensate for this I denoted y= x/n where n is the number of people in each group and ran the regression

logistic.mod<-glm(y~Frequency+Location+Sex+Age.Group,family=binomial(link="logit"),data=earsag1.dat) 

At this point R told me that my y values were not integer values and hence there was an error. I do not know how, therefore, to set up the logistic regression properly, so I would be very grateful if someone could give me some pointers. If I haven't explained anything well enough, let me know. Thanks very much for your help,

Regards,

Michael Gray


