Censored data are inherent in any analysis, like Event History or Survival Analysis, in which the outcome measures the Time to Event (TTE). Censoring occurs when the event doesn’t occur for an observed individual during the time we observe them.
Despite the name, the event of “survival” could be any categorical event that you would like to describe the mean or median TTE. To take the censoring into account, though, you need to make sure your data are set up correctly.
Here is a simple example, for a data set that measures days after surgery until an adverse event (like an infection) occurs:
Data Setup for Time-To-Event Analysis
Person Adverse Event Days Censored
1 YES 4 NO
2 YES 44 NO
3 NO 49 YES
4 YES 70 NO
5 NO 90 YES
All patients were followed after surgery for the occurrence of adverse events. So we would want to measure the median TTE, or the median number of days to experiencing an adverse event after surgery.
The event in this case is Adverse Event = YES. The total time patients were followed was 90 days. We can see that Patient 1 had an adverse event at 4 days post-op, while patient 3 did not have an adverse event – but was only followed for 49 days.
By having one variable for number of days and another that indicates whether censoring occurs, we can account for censoring in calculating each person’s risk of the event occurring.