Learn R Programming

etm (version 1.1.2)

tra: Matrix of possible transitions

Description

Miscellaneous functions that compute the matrix of possible transitions used as argument in the etm function.

Usage

tra_ill(state.names = c("0", "1", "2"))
tra_ill_comp(nComp = 2,
     state.names = as.character(seq(0, nComp + 1, 1)))
tra_comp(nComp = 2,
         state.names = as.character(seq(0, nComp)))
tra_surv(state.names = c("0", "1"))

Value

A quadratic matrix with TRUE if a transition is possible,

FALSE otherwise.

Arguments

state.names

A vector of characters giving the states names

nComp

For the competing risks models, the number of competing events

Author

Arthur Allignol arthur.allignol@gmail.com

Details

These functions compute the matrix of possible transitions that is used as argument in, e.g., the etm function. tra_surv is for the usual survival model, tra_comp for the competing risks model, tra_ill for the illness-death model and tra_ill_comp for the illness-death model with competing terminal events. By default, state names are from 0 to ...

See Also

etm

Examples

Run this code
tra_ill()

## competing risks model with 4 competing events non-default state names
tra_comp(4, state.names = c("healthy", "Cardiac problems", "Cancer",
                           "Rhenal failure", "Other"))

Run the code above in your browser using DataLab