Why is RStudio freezing when I try to extract confidence intervals and odds ratios from a glmer Poisson model?

Viewed 25

I'm trying to run a mixed effects model. I've included a simplified version of it below;

Poisson1 = 
    glmer(
    formula = 
      wheezing_InD ~ 
      age_InD + 
      (1|countryfactor),
    family=poisson(link="log"),
    data = Data46)

I am then trying to get the ORs and confidence intervals from it using the code below:

exp(cbind(OR = coef(Poisson1), confint(Poisson1)))

A sample of the data is as follows (in dput form):

structure(list(wheezing_InD = c("0", "1", "1", "0", "0", 
"0", "0", "0", "1", "0", "0", "0", "0", "1", "0", 
"0", "1", "1", "1", "0"), age_InD = c(55L, 24L, 23L, 
30L, 40L, 43L, 37L, 38L, 18L, 23L, 28L, 33L, 27L, 54L, 23L, 23L, 
42L, 48L, 31L, 18L), countryfactor = structure(c(1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L), .Label = c("cameroon", "ghana", "kenya"), class = "factor")), row.names = c(NA, 
20L), class = "data.frame") 

The code runs fine, but the software freezes when trying to compute the confidence intervals. It gets stuck at "Computing profile confidence intervals ..." and won't progress until I manually abort the code.

This method of extracting ORs + CIs has worked for me in the past with fixed effects binomial models. Is there a reason it isn't working here?

Thanks in advance

0 Answers
Related