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

transhelp

Help functions for transition matrix


Description

Help functions to get insight into the structure of a transition matrix.

Arguments

trans

Transition matrix, for instance produced by transMat), trans.comprisk, or trans.illdeath

Details

Function to.trans2 simply lists the transitions in trans in a data frame; function trans2Q converts trans to a Q matrix, the (j,k)th element of which contains the (shortest) number of transitions needed to travel from the jth to the kth state; function absorbing returns a vector (named if trans contains row or columnc names) with the state numbers that are absorbing; function is.circular returns (a Boolean) whether the transition matrix specified in trans is circular or not.

Value

See details.

Author(s)

Hein Putter <H.Putter@lumc.nl>

Examples

# Irreversible illness-death model
tmat <- trans.illdeath(c("Healthy", "Illness", "Death"))
tmat
to.trans2(tmat)
trans2Q(tmat)
absorbing(tmat)
is.circular(tmat)
# Reversible illness-death model
tmat <- transMat(x = list( c(2, 3), c(1, 3), c() ),
                 names = c("Healthy", "Illness", "Death"))
tmat
to.trans2(tmat)
trans2Q(tmat)
absorbing(tmat)
is.circular(tmat)

mstate

Data Preparation, Estimation and Prediction in Multi-State Models

v0.3.1
GPL (>= 2)
Authors
Hein Putter [aut, cre], Liesbeth C. de Wreede [aut], Marta Fiocco [aut], Ronald B. Geskus [ctb], Edouard F. Bonneville [ctb], Damjan Manevski [ctb]
Initial release
2020-12-17

We don't support your browser anymore

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