Created
December 23, 2015 14:29
-
-
Save daynebatten/d5a143559b863ff5edb6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generate a survival fit using our cox results and imaginary customers | |
plot_fit <- survfit(fit, newdata = new_values, id = id) | |
# Plot the results! | |
plot(plot_fit, mark.time = FALSE, col = c('red', 'blue'), ylim = c(.6, 1), xlab = 'Days Since Signing Up', ylab = 'Percent Surviving') | |
legend(25, .8, legend = c('Contacted Support at Day 500', 'Never Contacted Support'), col = c('red', 'blue'), lty = c(1, 1)) | |
title('Support Interactions and Churn') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment