plotCuminc: Cumulative incidences curves

Description Usage Arguments Value See Also Examples

View source: R/plotCuminc.R

Description

Plots cumulative incidences curves for each risk and group.

Usage

1
2
3
plotCuminc(ci, cens = NULL, target = NULL, ggtheme = theme_minimal(),
  titleCuminc = "Cumulative incidence functions", xtitle = "Time",
  ytitleCuminc = "Cumulative incidences", legendtitle = "Group")

Arguments

ci

a result of function fitCuminc.

cens

value of 'risk' indicating censored observation (default 0).

target

point in time, in which the confidence bounds should be plotted (default NULL, no confidence bounds plotted).

ggtheme

ggtheme to be used (default: theme_minimal()).

titleCuminc

a title of a plot (default: "Cumulative incidence functions").

xtitle

a title of x axis (default: "Time").

ytitleCuminc

a title of y axis (default: "Cumulative incidences")

legendtitle

a title of a legend (default: "Group").

Value

a ggplot containing n graphs, where n is number of risks. Each graph represents cumulative incidence curves for given risk. One curve corresponds to one group.

See Also

ggplot ggtheme

Examples

1
2
fitC <- fitCuminc(time = LUAD$time, risk = LUAD$event, group = LUAD$gender, cens = "alive")
plotCuminc(ci = fitC, cens = "alive", target = 1200)

Example output

Loading required package: ggplot2
Loading required package: survival
Loading required package: cmprsk
Loading required package: gridExtra
19 cases omitted due to missing values

cr17 documentation built on May 1, 2019, 7:31 p.m.