Skip to content

Instantly share code, notes, and snippets.

@daynebatten
Last active March 8, 2016 12:48
Show Gist options
  • Save daynebatten/68d3f4b05daff1a20d73 to your computer and use it in GitHub Desktop.
Save daynebatten/68d3f4b05daff1a20d73 to your computer and use it in GitHub Desktop.
fit <- survfit(survival ~ 1, data = ch)
plot(fit, mark.time = FALSE, col = c('red', 'blue'), xlab = 'Days Since Subscribing', ylab = '% Experiencing Event')
title('Cumulative Incidence of 2 Hazards')
legend(x = 0, y = .2, col = c('red', 'blue'), legend = c('Churn', 'Upgrade'), lty = c(1, 1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment