tra {etm}R Documentation

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

Arguments

state.names

A vector of characters giving the states names

nComp

For the competing risks models, the number of competing events

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

Value

A quadratic matrix with TRUE if a transition is possible, FALSE otherwise.

Author(s)

Arthur Allignol arthur.allignol@gmail.com

See Also

etm

Examples

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

[Package etm version 1.1.1 Index]