[R] Two-level Poisson model with cross classified random effects

Renaud Lancelot renaud.lancelot at cirad.fr
Wed Aug 17 11:09:49 CEST 2005


Shige Song a écrit :
> Dear All,
> 
> I have two-level data with individual as level-1, birth cohort and
> community as level-2. All the level-2 covariates are generated from
> the level-1 covariates by cross-classifying by cohort and community.
> 
>>From what I read, an ordinary three-level model with individual nesed
> within birth cohort nested within community, or individual nested
> within community nested within birth cohort do not work well, neither
> do model with individual nested within community by cohort. The right
> way to go is to estimate a two-level model with two separate random
> effects: within cohort and within community. The question I want to
> ask is: how to do this using lmer?
> 
> I tried the following for a simple unconditioal model:
> 
> m1 <- lmer(count ~ offset(log(total)) + (1|comm) + (1|cohort), data, poisson)
> 
> where "count" is the dependent variable, "total" is the exposure
> variable, "comm" is the community ID, and "cohort" is the birth cohort
> ID. Will this be suffice? I got really smalle randome intercept
> (5.0000e-10 for community and 4.4226e-05 for cohort), which got me a
> bit nervous.
> 
> Thanks!
> 
> Best,
> Shige
> 
> ______________________________________________
> 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
> 

The default method to fit generalized mixed-effect models with lme4 is 
"PQL" which is fast but not very accurate for the random effects (they 
might be underestimated). Try other methods ("Laplace" or "AGQ") to see 
if you get different results.

Best,

Renaud

-- 
Dr Renaud Lancelot, vétérinaire
Projet FSP régional épidémiologie vétérinaire
C/0 Ambassade de France - SCAC
BP 834 Antananarivo 101 - Madagascar

e-mail: renaud.lancelot at cirad.fr
tel.:   +261 32 40 165 53 (cell)
         +261 20 22 665 36 ext. 225 (work)




More information about the R-help mailing list