Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


cohorttools (version 0.1.6)

plotcuminc: Plots cumulative incidence rates

Description

Plots cumulative incidence rates

Usage

plotcuminc(ftime, fstatus, cencode, pop.length = 50, group, ...)

Value

if missing group ggplot2 object or if group given named list of ggplot2 objects

Arguments

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

Author

Jari Haukka jari.haukka@helsinki.fi

See Also

survival pyears

Examples

Run this code
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))

Run the code above in your browser using DataLab