MaaikeV
MaaikeV

Reputation: 1

issingular warning in rtp with datatype="poisson", not in GLMER of same model

I get a warning when I try to calculate repeatability with the rtpR package. I have two observations of White blood cells types on 20 blood-slides. My response variable is WBC-type (e.g. Lymphocyte), my random effect is Slide number (SlideNo). My formula looks like this:

rpt(Lymphocyte ~ 1 + (1 | SlideNo), 
   grname = c("SlideNo"), 
   data = Self, datatype = "Poisson", 
   ratio = TRUE, nboot = 1000, npermut = 0)

when I run this, I get the warning "boundary (singular) fit: see help('isSingular')". The same is true for a similar data-set, but then with 3 observations of 20 slides.

When I run a glmer with the same set-up (glm1=glmer(Lymphoctye ~1 + (1 | SlideNo), family= "poisson", data = Self)), I do not get the warning.

My question is two fold:

  1. what could cause this warning? I suspect that it has something to do with calculating the standard error, because that is done by bootstrapping, correct?.
  2. Is there anything that I can do to avoid getting the warning

I tried to find an answer by googling, but cannot find it. The only suggestions/indications I got was to simplify the model, which I cannot do because the model is already as simple as it can be, and that the warning may be caused by the permutations, which is set to zero, so that also cannot be the problem (I think?)

Upvotes: 0

Views: 33

Answers (1)

Ben Bolker
Ben Bolker

Reputation: 226712

This behaviour isn't hard to replicate; I don't think it's a problem. Singular fits are likely any time the among-cluster variance is small relative to the within-cluster variance. Even if it doesn't happen in the initial fit, it's not surprising that it would happen in some (or even many) of the bootstrap samples. (It basically suggests that if you were to re-do the experiment many times, you would often get data that would give you a singular fit ...)

I don't see any reason that this would invalidate the inferences from the bootstrap sample (although that might be a better question for Cross Validated).

library(rptR)
library(lme4)
dd <- expand.grid(rep=1:3, slide = 1:20) 
dd$Lymphocyte <- simulate(~1 + (1|slide), 
    newdata = dd, newparams = list(beta = 3, theta = 1), family = poisson,
   seed = 101)[[1]]
glmer(Lymphocyte ~ 1 + (1 | slide), 
   data = dd, family = poisson)
set.seed(101)
rpt(Lymphocyte ~ 1 + (1 | slide), 
   grname = c("slide"), 
   data = dd, datatype = "Poisson", 
   ratio = TRUE, nboot = 1000, npermut = 0)

Upvotes: 0

Related Questions