transhelp | R Documentation |
Help functions to get insight into the structure of a transition matrix.
trans |
Transition matrix, for instance produced by |
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.
See details.
Hein Putter <H.Putter@lumc.nl>
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.