I have some data that is right censored. A study has recorded data for several years and some units have failed and some units have not failed (right censored).

Now, some of the units observe a minor event (not failure but something proposed by experts to be an indicator that a failure is about to occur). Let's call this event B. Failure being event A.

I am trying to obtain a distribution for the times of event B for a new unit.

Approximately 25% of the failed units observe event B, and only a handful of right censored units observe event B.

I tried to approach this problem as a time to event problem where censored units are the units that do not experience event B. I also discarded the 75% of failed units that did not experience event B because I knew these units could not experience event B in the future.

Let $T_B \sim Weibull(\alpha, \beta)$ be the time to event B. I have written the likelihood as:

\begin{equation} L(\theta) = f(T_i \mid \theta)^{\delta_i} S(T_i \mid \theta)^{1-\delta_i}, \end{equation}

where $\delta_i = 1$ if unit $i$ experiences event B.

The model is giving poor predictions to the real data. I think it may be because most of the right censored units will not observe event B at all and hence there will be no time of event B for these units. For example, when modelling the time to event A I know that all units will experience event A at some point, but this is not the case for event B.

I have included a plot of the simulated data and the real data. The simulated data is in red. It is difficult to see the real data because it is on a much smaller scale, but if you look closely on the left side of the plot you can see a thin black line. I have plotted the times of event B and the censored times (the final times of the units that did not observe event B). The simulated times are way higher than I expect the units to live for. enter image description here

I have fit a model without the units that do not experience event B, and this gives me a good idea of when event B occurs and I know that approximately 25% of units will experience the event. I could just say that event B occurs with probability $p=0.25$ and give a $95\%$ prediction interval for when the event is expected to occur.

However, I have a feeling that I am missing out some information by not including the right censored units (right censored with respect to event B).

The way I am imagining this problem is similar to modelling the deaths of patients in hospital. Some of these patients may experience a kidney failure after being admitted to hospital. Patients who die without having kidney failure cannot be useful for predicting the time of kidney failure for a newly admitted patient. But, what about patients who are still alive and have not yet experienced kidney failure? They are still susceptible to kidney failure, it just has not been observed yet. Would I include these patients in the model likelihood as above?


1 Answer 1


If you have two different types of events, then you should set this up as a multi-state model with competing risks. The principles are outlined in the documentation for the R survival package, with a brief introduction in the main vignette and more details in the multi-state vignette. Although the emphasis in these documents is on Cox proportional hazards models, the principles apply to parametric models like yours, too.

The main trick is that instead of a single 0/1 censored/event indicator, you use a categorical indicator for the event. In R, it's expected that the reference level for the categorical indicator is for censoring while other levels represent the other types of events. This usually also requires using a counting-process type of analysis, with a (startTime, stopTime] handling of the time intervals that lead up to each event (of either type) or censoring. That gives you a way to evaluate the potential transitions to ultimate failure state A whether or not the units go through the intermediate state B.


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.