I'm conducting regression analysis on sleeping time data. The data is survey data and the answer possibilities are of type "less than 4 h", "5 h", "6 h", etc. so they can be thought to be interval censored answers of individuals' real sleep times (E.g. if a person sleeps 6.8 hours a night, s/he might answer "7 h". Then if someone answered "7 h" we know that the real sleep length is somewhere between 6.5 and 7.5 hours). The data contains repeated measurements. Every individual has answered the same question on 4 different studies, which are a couple of years apart from each other. This introduces a grouping factor, frailty, in survival regression terms.

I have searched without result an R package, a Python module or something else that can model survival regression with Weibull distribution, interval censoring and frailty. Does someone know one?

  • $\begingroup$ I don't see how this qualifies as survival data at all, nor why the use of repeated measurements justifies talk of frailty. The response variable looks ordinal to me if the lowest level is less than 4 hours. (Suppose I only slept 2 hours.) What software you might use would be off-topic here, but as I think there's much room for discussion on what kind of problem you have the question could remain here, but would benefit from a different title and emphasis. $\endgroup$
    – Nick Cox
    Commented Apr 4, 2016 at 13:24
  • $\begingroup$ There is no R package that might do what you want, as far as I know. Interval-censoring is a survival analysis problem in general. However, as a conceptual problem I understand that all the observations are interval censored. In the absence of uncensored observations, I don't think that you can get something useful out of it even without frailty, so maybe just keeping the categories as they are is a more sensible thing to do. $\endgroup$
    – Theodor
    Commented Apr 4, 2016 at 13:55
  • $\begingroup$ You may check frailtypack (it is a package implemented in R). $\endgroup$
    – sztal
    Commented Jul 12, 2016 at 11:11

1 Answer 1


If your intervals that you divide things up with do not overlap (for example, all response variable end up in disjoint bins, such as [0,2.5), [3.5,4.5), [4.5,5.5), etc), I would actually suggest you disregard the interval censored aspect of your data, and merely treat it as ordinal/discrete. And my bias is toward using interval censored methods!

The reason for this is that when using non-parametric and semi-parametric interval censored data estimators, if the intervals do not overlap, your results are exactly equivalent to the results if you had treated them as discrete ordered outcomes (ie 1 = [0,2.5), 2 = [2.5,3.5), etc). As such, special software is really unnecessary; you could easily use R's ordinal package or even coxme for mixed effects models.

If for some reason that doesn't currently make sense to me, your response intervals were overlapping (ie for some reason you believe subject 1's exact time was in the interval [6-8), but you also believed subject 2's exact time was [7-9)) OR you're really committed to using fully parametric models, you can fit interval censored regression models (fully parametric AFT models can be found in the survival package, non-parametric, semi-parametric and fully parametric proportional odds and proportional hazards models can be found in my own icenReg package).

But I'm not aware of any software for mixed effects models for interval censoring data at the moment (for the record, I don't claim to be familiar with what SAS or Stata has available) . If you really wanted a parametric mixed effects model, you could hand code your model into something like Stan or RJags (my understanding is that they both have syntax that allows for interval censoring). But I would strongly suggest using the ordinal or coxme packages.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.