1

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.

Gilles
  • 11
  • 1
  • Just a nitpicky thing, but what is returned by `ranef()` for GLMMs probably should be called "conditional modes", rather than BLUPs (re: Douglas Bates' comments [here](https://stat.ethz.ch/pipermail/r-sig-mixed-models/2007q1/000125.html)). – alexforrence Jun 05 '15 at 21:31
  • Thanks, I'll take that into account when writing my report! – Gilles Jun 07 '15 at 08:19

1 Answers1

1

Your model is using a log link function, so the BLUPs are on the log scale, not the count scale. To get the latter take $e^{BLUP}$

Jake Westfall
  • 11,539
  • 2
  • 48
  • 96
  • Ah, so my reasoning was correct, thanks! Does this also mean that the variances of the random effects are on a log scale? – Gilles Jun 07 '15 at 08:20
  • 1
    Yes, they are variances of the log-scale random effects, not the count-scale random effects. – Jake Westfall Jun 07 '15 at 14:40