I am working on a regular customer survival analysis problem. Here I analyze customers who signed up between 2015-1-1 & 2018-1-1. Customers can register anytime during this interval and exit anytime during or after the cut-off date of 2018-1-1.
A sample data is shown below. First column is an identifier, second column is their current status - '1 for canceled & 0 for not-cancelled'. Third column is the number of weeks between their registration date & 2015-1-1. Last column is the number of weeks between their cancellation date and 2015-1-1 (if cancelled before 2018-1-1) or number of weeks between 2015-1-1 and 2018-1-1 (if not cancelled or cancelled after 2018-1-1).
dput() to generate the above dataset
structure(list(PrimaryConstituentSKey = c(1370591L, 1225587L, 1264156L, 1266355L, 3080025L), Cancelled = c(1, 1, 1, 1, 0), startTime = c(0, 0, 0, 1, 101), stopTime = c(10, 34, 5, 9, 123)), row.names = c(NA, -5L), class = "data.frame")
I will use this data to create a 'Survival object' which later will be used a response variable for my survival model as follows.
S <- Surv(time = df$startTime, time2 = df$stopTime, event = df$Cancelled) model <- survfit(S ~ predictor1 + predictor2+.., data = df)
I am wondering if this approach makes sense ? I am especially interested to know what sort of censoring /truncation is suitable in this scenario ? Do I need to modify my data to reflect those censoring/truncation ?
Note: Should 'Cancelled' be the status as of cut-off date or as of now ?