[R-sig-ME] Need for help with random-effect coding in Poisson model

David Evans davidwevans at hotmail.com
Tue Mar 30 18:22:54 CEST 2010


Hello all,

Thanks in advance to anyone who can help answer my (simple) questions  
about some mixed modelling issues.

I want to model the rate of a disease event using Poisson-family glmer  
and an offset for follow-up time.  In the data, patients (approx.  
2000) are clustered within treating centres (approx. 100) (no patient  
has more than one centre) and patients can have multiple events.   I  
want to include both centre and patient as random effects and a  
patient-level exposure as a fixed effect, to calculate an incidence  
rate ratio for this exposure.

My first question is about coding.  I am hesitating between
mod1 <- glmer(event ~ exposure + offset(log(follow-up_time)) + (1 |  
idcentre/idpatient), family=poisson, data=data)
and
mod2 <- glmer(event ~ exposure + offset (log(follow-up_time)) + (1 |  
idcentre) + (1 | idpatient), family=poisson, data=data)

I think mod1 represents the nested data structure correctly.  Is this  
correct?  Could anyone help explain the differences between the two?   
It seems to make no difference to the results, which I find surprising.

My second question is about the unbalanced data.  Some centres have  
only two patients, some have over 20.  Further, some patients have no  
events, some only one, many two, and then the number decreases  
smoothly down to one patient who had 12.  I suspect this could make  
estimating the random effects for patient and centre difficult but  
would be grateful if someone could let me know how much of a problem  
this is....  For example, are there estimation methods other than REML  
with glmer that I could try?

Again, thanks for any responses.

David Evans.




More information about the R-sig-mixed-models mailing list