[R] weights in lmer

Chris O'Brien obrienc at email.arizona.edu
Tue Aug 14 20:00:28 CEST 2007


Dear R users,

Prof. Ripley just corrected my understanding of the use of weights in glm, 
which I thought would allow me to correctly use lmer.  However I'm still 
having problems.

My data takes the form of # of infected and uninfected individuals that 
were measured over time under different treatments.  I'm using lmer to 
adjust for the repeated measures over time.

In fitting the model:

 > model1=lmer(y~treatment+(time | ID),family=binomial,weights = total)

where y = proportion of animals infected (number infected/total)
         total = number of infected + number uninfected

this returns the error:

Error in lmer(y ~ treatment + (time | ID), family = binomial, weights = 
total) :
         object `weights' of incorrect type

Can anyone tell me what's wrong with the weights?

cheers,
Chris





Chris O'Brien
Sonoran Desert Research Station and
School of Natural Resources
Biological Sciences, room 125
University of Arizona
Tucson, AZ 85721
work (520) 623-3720
obrienc at email.arizona.edu



More information about the R-help mailing list