plotcuminc {cohorttools}R Documentation

Plots cumulative incidence rates

Description

Plots cumulative incidence rates

Usage

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

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

Value

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

Note

package cmprsk and ggplot2 are utilized

Author(s)

Jari Haukka jari.haukka@helsinki.fi

See Also

survival pyears

Examples

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))

[Package cohorttools version 0.1.4 Index]