You can use the lmer function in the Matrix package or glmmPQL in the
MASS package. The former would be used like this:
p1 <- lmer(count ~ treatment + (1|subject), family=poisson)
Dave
On 20/09/06, Mark Jankowski <mdjankowski at wisc.edu>
wrote:> Hello,
>
> I am trying to formulate a glm model with repeated measures of viral
> blood counts where animal weight is a covariate. Animal treatment
> group is the fixed effect and subject is the random effect. I'm
> thinking this situation calls for a mixed model in the Poisson family
> with data correlated to days post inoculation (DPI) where animal
> weight is factored out to not influence goodness of fit tests.
>
> How might I alter the following code to reflect this situation?
>
> glm(count~treatment,family=poisson)
>
> If this is too much to ask, I understand! I realize I've got a ways
> to go in writing this...
>
> Many thanks!
> Mark
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
================================David Barron
Said Business School
University of Oxford
Park End Street
Oxford OX1 1HP