Skip to content
Prev 32197 / 398506 Next

Syntax for random effect in glmmPQL

Dear R-listers

I wonder if someone can help me with the syntax for the random effect in
glmmPQL()? I have a data set with a response variable "y" (counts), two
dependent variables: "treat" (4 levels) and "site" (2 levels). The
latter, I want to use as a random variable. How do I specify this in the
function?

Is it like this: glmmPQL(y~treat,random=~1|site,family=poisson,
data=mydata)? What does the ~1 do?

Thanks in advance, Mikael Niva

********************************************
Mikael Niva
Avd. f?r V?xtekologi, Dept. of Plant Ecology 
EBC
Uppsala Universitet