Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

etmCIF

Cumulative incidence functions of competing risks


Description

etmCIF is a wrapper around the etm function for facilitating the computation of the cumulative incidence functions in the competing risks framework.

Usage

etmCIF(formula, data, etype, subset, na.action, failcode = 1)

Arguments

formula

A formula object, that must have a Surv object on the left of ~ operator, and a discrete covariate (or 1) on the right. The status indicator should be 1 (or TRUE) for an event (whatever the type of this event, 0 (or FALSE) for censored observations.)

data

A data.frame in which to interpret the terms of the formula

etype

Competing risks event indicator. When the status indicator is 1 (or TRUE) in the formula, etype describes the type of event, otherwise, for censored observation, the value of etype is ignored

subset

Expression saying that only a subset of the data should be used.

na.action

Missing-data filter function. Default is options()$na.action.

failcode

Indicates the failure type of interest. Default is one. This option is only relevant for some options of the plot function.

Details

This function computes the cumulative incidence functions in a competing risks setting using the etm machinery, without having to specify the matrix of possible transitions and using the more usual formula specification with Surv

Value

Returns a list of etm objects (1 per covariate level) plus additional informations:

failcode

As in function call

call

Function call

X

A matrix giving the name of the covariate (if present) and the levels of this covariate.

Author(s)

Arthur Allignol arthur.alignol@gmail.com

See Also

Examples

data(abortion)

cif.ab <- etmCIF(survival::Surv(entry, exit, cause != 0) ~ group, abortion,
                 etype = cause, failcode = 3)

cif.ab

plot(cif.ab, ci.type = "bars", pos.ci = 24,
     col = c(1, 2), lty = 1, curvlab = c("Control", "Exposed"))

etm

Empirical Transition Matrix

v1.1.1
MIT + file LICENSE
Authors
Mark Clements [aut, cre], Arthur Allignol [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.