plotcuminc | R Documentation |
Plots cumulative incidence rates
plotcuminc(ftime, fstatus, cencode, pop.length = 50, group, ...)
ftime |
failure time variable |
fstatus |
variable with distinct codes for different causes of failure and also a distinct code for censored observations |
cencode |
value of fstatus variable which indicates the failure time is censored. |
pop.length |
number of population sizes shown |
group |
plots will be made for each group. If missing then treated as all one group |
... |
additional parameters |
if missing group ggplot2 object or if group given named list of ggplot2 objects
package cmprsk and ggplot2 are utilized
Jari Haukka jari.haukka@helsinki.fi
survival
pyears
set.seed(2) ss <- rexp(100) gg <- factor(sample(1:3,100,replace=TRUE),1:3,c('a','b','c')) cc <- sample(0:2,100,replace=TRUE) print(plotcuminc(ftime=ss,fstatus=cc,cencode=0)) print(plotcuminc(ftime=ss,fstatus=cc,cencode=0,group=gg))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.