I am going through the documentation of cox-regression (lifelines package in python/survival in R) and they state the following:
coxph(formula, data, method) # in R
# formula is linear with Surv(time, event)
cph = CoxPHFitter() # in python
cph.fit(data, duration_col, event_col)
I understand the duration/time component. That is simply the observation at time t. What is the event aspect of the formula? From doing some reading, it says it is the right-censored observations. For example, a study looking at strokes. The study ends after 5 years. Those patients who have had no strokes by the end of year 5 are censored. What does that mean?
Furthermore, the lifelines package allows you to pass a formula
to handle the right-hand-side of the linear model. Is this the same as the formula
in R? It seems like the formula
is a necessary requirement to begin with.