Description Usage Arguments Author(s)
Kaplan Meier Plot from Matt Cooper (http://mcfromnz.wordpress.com/2012/05/05/kaplan-meier-survival-plot-with-at-risk-table-by-sub-groups/)
1 2 3 4 5 | ggkm(sfit, sdiff = NULL, table = TRUE, returns = FALSE, plot = T,
color = TRUE, xlabs = "Time", ylabs = "Survival Probability",
xlims = c(0, max(sfit$time)), ylims = c(0, 1), ystratalabs = NULL,
ystrataname = NULL, timeby = 100, main = "Kaplan-Meier Plot",
pval = TRUE, pval.size = 4, probs = NULL, subs = NULL, ...)
|
sfit |
a |
sdiff |
a |
table |
logical: Create a table graphic below the K-M plot, indicating at-risk numbers? |
returns |
logical: if |
plot |
logical: if |
color |
logical: if |
xlabs |
x-axis label |
ylabs |
y-axis label |
xlims |
the limit of x axis |
ylims |
the limit on the y axis |
ystratalabs |
The strata labels. |
ystrataname |
The legend name. Default = "Strata" |
timeby |
numeric: control the granularity along the time-axis |
main |
plot title |
pval |
logical: add the pvalue to the plot? |
pval.size |
size of the pvalue in the plot. Default to 3 |
probs |
numeric: vector with survail probabilities that will be marked by dotted lines, dfault to NULL |
subs |
default to NULL |
Matt Cooper http://statbandit.wordpress.com/2011/03/08/an-enhanced-kaplan-meier-plot/
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.