# Help with Right Censoring for survival analysis

Hi all I would like to do some survival analysis. The most difficult part for me is setting up the censoring data correctly and I would appreciated if someone can help confirm if I'm doing this correctly. According to R's ?Surv function.

"For interval censored data, the status indicator is 0=right censored, 1=event at time" how I interpret this is: 1=death before event, 0= lost of follow-up or alive AFTER time to event

I'm interested in Overall survival - time to event is 60 months. Below is my dataframe with some data and what I think censoring should be for the given row. lastseen is basically the highest data including followup and recurrence that was reported for that particular subject. death.month sometimes is unavailable, thus denoted as NA. Can someone confirm if my censor code is correct?

     death.month  lastseen OS.censor    OS.month
34    9.034166   9.0341656         1   9.0341656
35          NA   2.0367937         0   2.0367937
36          NA   0.4599212         0   0.4599212
39          NA   8.6727989         0   8.6727989
40          NA  97.6675427         0  97.6675427
41  120.6964520 120.6964520        0  120.6964520
42   37.680683  37.6806833         1  37.6806833
43   49.014455  49.0144547         1  49.0144547


That's correct. Formally, each patient record consists of the time $t > 0$ when an event occurred or the time $c > 0$ of censoring. Since censoring and experiencing and event are mutually exclusive, it is common to define an event indicator $\delta \in \{0; 1\}$ and the observable survival time $y > 0$. The observable time $y$ of a right censored sample is defined as $$y = \min(t, c) = \begin{cases} t & \text{if } \delta = 1 , \\ c & \text{if } \delta = 0 , \end{cases}$$ where $\delta = 1$ if a patient experienced and event and zero otherwise.