Kaplan-Meier Survival plot – with at risk table, by sub groups

May 4, 2012

(This article was first published on Matt's Stats n stuff » R, and kindly contributed to R-bloggers)

This is a follow on from the previous post, with updated code.

There was an argument ‘groups’ in the ggplot(…) line of the code that was working but is now no longer working with the updated version of R/ggplot2 (I don’t know the full ins and outs of this sorry). So code is fixed and available below.

Most up-to-date code available here: http://pastebin.com/FjkWnCWm

Code originally included in this post: http://pastebin.com/yRmuZtPG

To leave a comment for the author, please follow the link and comment on their blog: Matt's Stats n stuff » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.