For school, I'm tasked with investigating the effect of beta carotene on the prevention of skin cancer. For this, I have data on several patients that are examined over the course of 5 years in medical centers. In essence, each year the patient goes to his examination center, and the number of new skin cancers since the previous examination are counted. So we have a placebo controlled multilevel study (patient's in centers). My outcome is the number of new skin cancers since the previous checkup.
I want to fit a Linear Mixed Model using the GMLER method of the LME4 package, and opt for a poisson model because our outcome is a count variable.
mod1 <- glmer(Y ~ 1 + Treatment*Year + (1 | Center/ID),
data = skin, family = poisson(link = "log"))
I found that, to investigate the BLUPs, I have to do the following
ranef(mod1)
I'm assuming this gives me BLUPs on the patient level, and on the center level.
The problem however, is that these most of these BLUPs are negative (between -1 and 0), which is not what I expect as I'm working with count data.
It occurred to me that I'm using the log-link in my model, so I then exponentiated the BLUPs from ranef
, and, because my original BLUPs are between -1 and +inf, I now obtain only positive values.
But is this correct, or do I have to specify my model differently or do something else to get the BLUPs.