Luis Fernando Chaves asks: : -----Original Message----- : From: [EMAIL PROTECTED] : [mailto:[EMAIL PROTECTED] On Behalf Of Luis : Fernando Chaves : Sent: Sunday, 24 April 2005 11:29 AM : To: [EMAIL PROTECTED] : Subject: [R] A question on the library lme4 : : : Hi, : : I ran the following model using nlme: : : model2 <- lme(log(malrat1) ~ I(year-1982), : random = ~1|Continent/Country, data=wbmal10) : : I'm trying to run a Poisson GlMM to avoid the above : transformation but I : don't know how to specify the model using lmer in the lme4 library: : : model3 <- lmer((malrat1) ~ I(year-1982) + ??, : data=wbmal10, family=poisson)
(I asked the same question of Doug Bates, as it happens.) Try the following: wbmal10 <- transform(wbmal10, Cont_Country = Continent:Country) require(lme4) model3 <- lmer(malrat1 ~ I(year - 1982) + (1|Continent) + (1|Cont_Country), family = poisson, data = wbmal10) : : How can I introduce a random factor of the form= ~1|Continent/Country? : : Thanks; : : -- : Luis Fernando Chaves : : ______________________________________________ : R-help@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 : ______________________________________________ R-help@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