Debian Codegraph @

man/transhelp.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/datasets.R
3 \name{transhelp}
4 \alias{transhelp}
5 \alias{to.trans2}
6 \alias{trans2Q}
7 \alias{absorbing}
8 \alias{is.circular}
9 \title{Help functions for transition matrix}
10 \arguments{
11 \item{trans}{Transition matrix, for instance produced by \code{transMat}),
12 \code{trans.comprisk}, or \code{trans.illdeath}}
13 }
14 \value{
15 See details.
16 }
17 \description{
18 Help functions to get insight into the structure of a transition matrix.
19 }
20 \details{
21 Function \code{to.trans2} simply lists the transitions in \code{trans} in a
22 data frame; function \code{trans2Q} converts \code{trans} to a \code{Q}
23 matrix, the (j,k)th element of which contains the (shortest) number of
24 transitions needed to travel from the jth to the kth state; function
25 \code{absorbing} returns a vector (named if \code{trans} contains row or
26 columnc names) with the state numbers that are absorbing; function
27 \code{is.circular} returns (a Boolean) whether the transition matrix
28 specified in \code{trans} is circular or not.
29 }
30 \examples{
31
32 # Irreversible illness-death model
33 tmat <- trans.illdeath(c("Healthy", "Illness", "Death"))
34 tmat
35 to.trans2(tmat)
36 trans2Q(tmat)
37 absorbing(tmat)
38 is.circular(tmat)
39 # Reversible illness-death model
40 tmat <- transMat(x = list( c(2, 3), c(1, 3), c() ),
41 names = c("Healthy", "Illness", "Death"))
42 tmat
43 to.trans2(tmat)
44 trans2Q(tmat)
45 absorbing(tmat)
46 is.circular(tmat)
47
48 }
49 \author{
50 Hein Putter <[email protected]>
51 }
52 \keyword{univar}