I am trying to use SVM and Logistic Regression for survival analysis but I am not able to properly find the implementation in R or python? I was wondering if it was possible to predict whether a customer, given his features, would survive in the next 30 or 60 days or not? I can predict if he has churned or not at that moment, but not able to say whether he will still be a customer in 30/60 days. I was thinking about adding a weight depending on his last purchase date but not sure if that's the correct way. Can someone help me out on this and tell me if this is a viable method? Or point me to a viable method?



First of all there needs to be clarification on your use of the phrase "survival analysis". In statistics there is a particular area associated with this term: https://en.wikipedia.org/wiki/Survival_analysis These survival methods (e.g., proportional hazards regression) address time to events and include concepts like censoring of observations and competing risks.

Per your description, it seems as though you may be attempting to evaluate an outcome at a set time point (i.e. cross-sections: 30-, 60-days) and have not mentioned time to event as a point of interest prior to say 30-days. This can be achieved using the typical logistic regression or SVM models with no special additional considerations.

A larger question is whether you want to control for time of event, competing outcomes, or censoring of data. If so, survival analysis would be an option. Otherwise you seem to be examining an outcome at a fixed cross-section of time and can move forward as usual.

P.S., You also use the tag "time varying covariate", which typically can get addressed using: https://academic.oup.com/ndt/article/32/suppl_2/ii84/2989980 However, in your post it is not clear this is present or what variables need to get addressed.

  • $\begingroup$ You are correct, I am trying to predict at a set point (in 30 days, 60 days). I was wondering how can I do this though? How do I set it so SVM or Logistic Regression give me predictions in 30/60 days time? $\endgroup$ – bawa Jul 2 '18 at 13:17
  • $\begingroup$ @bawa - So would this be supervised, in that you are creating a model with a known outcome? I wonder if you could add days into your model and extrapolate out into the future by adjusting the time value. Do you have time-varying covariates. This is a unique phenomenon that takes particular consideration not to open backdoor paths between the outcome and the exposures. Can you post what you think your current model may look like along with what data you do have. This can help other better direct their suggestions. $\endgroup$ – hlsmith Jul 2 '18 at 13:45
  • $\begingroup$ Yes this would be supervised. I dont believe I have time-varying covariates (if i understand correctly). Apologies, I am still a bit new to survival analysis. I have an online retail data which makes it tricky to tell if they have churned or not. The data: archive.ics.uci.edu/ml/datasets/online+retail I am not sure how I can build a model that gives me different predictions for 30 and 60 days. This is what my question is really. I have reduced the data into RFM (Recency, Frequency, Monetary) variables. I would like to build a model to give different predictions for 30 and 60 days $\endgroup$ – bawa Jul 2 '18 at 13:58
  • $\begingroup$ I would be happy to discuss this over a real-time chat or something if possible. $\endgroup$ – bawa Jul 2 '18 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.