We’re smarter together. Learn from this collection of community knowledge and add your expertise.

Survival Data Mining by Example in SAS® Enterprise Miner™

by SAS Super FREQ on ‎10-21-2015 03:27 PM - edited on ‎11-30-2015 02:55 PM by Community Manager (1,924 Views)


Download the Files (GitHub)


This tip is part of the Learn by Example with SAS® Enterprise Miner™ Templates series where a new data mining topic is introduced and explained with one or more example SAS Enterprise Miner process flow diagrams.


When you have a time-dependent outcome that you are trying to model—a failure of some sort or customer churn, for example—you might be interested in predicting when, not if, the event is most likely to occur.  In SAS Enterprise Miner, a discrete-time logistic-hazard model is used to perform survival data mining.  This approach allows you to model the event likelihood over time, taking into account censored observations, competing risks, time-varying covariates, and left truncation.  The hazard function produced by the model can be estimated at a future time interval of interest to answer questions like:


  • What is the probability a customer will churn by a certain date?
  • Which customers are most likely to churn in the next 3 months?
  • What is the expected remaining time for a customer?

To get started with survival data mining using SAS Enterprise Miner, download the process flow diagrams (XML files) and the accompanying PDF documentation for the following two examples from the GitHub repository at https://github.com/sassoftware/dm-flow/tree/master/SurvivalAnalysis.


  1. Survival: An example that shows the basic use of the Survival node and how different values for the Time Interval property can affect the results




  1. SurvivalTVC: An example demonstrating how to include time-varying covariates in your data when modeling with the Survival node.



To run these examples, refer to the README file that is part of the GitHub repository at https://github.com/sassoftware/dm-flow. Please note that these examples were tested with SAS Enterprise Miner 13.2.


You can find more information about the Survival node in these videos:


Introduction to Survival Data Mining 



New Features in the SAS Enterprise Miner 12.3 Survival Node



by Occasional Contributor dlakeland
on ‎07-27-2016 04:20 PM

Keep coming up with  "Must use one class target" in the survival node.....


Got 1 ID, 2 Time IDs, 1 Target and 2 Inputs....


by SAS Super FREQ
on ‎07-27-2016 04:22 PM

The target must have Level=Nominal (in Input Data node or Metadata node), with 0 representing censored obs.

by Occasional Contributor dlakeland
on ‎07-27-2016 04:27 PM

Thank you - I didbn't get that out of any of my reading.


by Frequent Learner jiunnru
on ‎03-31-2017 07:50 PM

How do the system calculate the numbers in "Summary of the Number of Censored and Uncensored Values" section in the results for SurvivalTVC? The number showed in that section was: Failed=1406, Censored=2292, but the actual number that I calculated was event(0)=2214, event(1)=1370, event(2)=114. Why is that?

Your turn
Sign In!

Want to write an article? Sign in with your profile.