plotCIF {hrcomprisk}R Documentation

Plot Incidence and Ratio of sHR/csHR

Description

Plot Cumulative Incidence and Ratio of sHR/csHR.

Usage

plotCIF(cifobj, maxtime = Inf, ci = NULL, eoi = -1)

Arguments

cifobj

A dataframe containing the Cumulative Incidence of each competing event by exposure group.

maxtime

Largest time to display on the x-axis of all output plots.

ci

A dataframe containing the 95% CI for each ratio of csHR/sHR.

eoi

Event number for the event of interest, useful when more than two events exist.

Value

A large list containing 2 figures:

$plot1

Plot the cumulative incidence of the composite event and of each event by exposure group.

$plot2

Plot the ratio of Sub-hazard ratio and Cause-specific hazard ratio for each event i (Ri).

Examples

#data from the package
data <- hrcomprisk::dat_ckid
#Estimate the Cumulative Incidence Functions and Ratios of sHR and csHR
mydat.CIF<-CRCumInc(df=data, time=exit, event=event, exposed=b1nb0, print.attr=FALSE)
#Plot the CIs and Ratios estimated
plots<-plotCIF(cifobj=mydat.CIF, maxtime = 20, eoi = 1)

[Package hrcomprisk version 0.1.1 Index]