[R-sig-ME] my first random effects logistic regression

David Duffy davidD at qimr.edu.au
Wed Aug 18 10:15:00 CEST 2010

On Wed, 18 Aug 2010, dieter.anseeuw wrote:

> A friend has inspected three randomly chosen farms (random factor 
> 'farm'). At each farm three randomly chosen series of chickens (random 
> factor 'flock' nested within 'farm') were each inspected for the 
> presence of a certain bacteria. The contaminated chickens were counted 
> (response variable 'positives'). The sample sizes per flock are given by 
> the variable 'broilers'. We want to have a look at within-broilers, 
> within-farm and between-farm variability.
>> model1<-glmer(positives~1 + (flock|farm), data=broilers.dat, family=binomial(link="logit"), weights=broilers)
> Error in eval(expr, envir, enclos) : y values must be 0 <= y <= 1

glmer() would like to know how many tested chickens were negative.

cbind(positives, negatives) ~

Cheers, David Duffy
| David Duffy (MBBS PhD)                                         ,-_|\
| email: davidD at qimr.edu.au  ph: INT+61+7+3362-0217 fax: -0101  /     *
| Epidemiology Unit, Queensland Institute of Medical Research   \_,-._/
| 300 Herston Rd, Brisbane, Queensland 4029, Australia  GPG 4D0B994A v

More information about the R-sig-mixed-models mailing list