Define transition matrices for multi-state model. Specific functions for defining such transition matrices are pre-defined for common multi-state models like the competing risks model and the illness-death model.
transMat(x, names)
x | List of possible transitions; x[[i]] consists of a vector of state numbers reachable from state i |
---|---|
names | A character vector containing the names of either the competing
risks or the states in the multi-state model specified by the competing
risks or illness-death model. |
A transition matrix describing the states and transitions in the multi-state model.
If names
is missing, the names "eventfree"
, "cause1"
,
etcetera are assigned in trans.comprisk
, or "healthy"
,
"illness"
, "death"
in trans.illdeath
.
Steven McKinney <smckinney@bccrc.ca>; Hein Putter <H.Putter@lumc.nl>
#> to #> from Disease-free Death Relapsed #> Disease-free NA 1 2 #> Death NA NA NA #> Relapsed 3 4 NA#> to #> from Normal Low Death #> Normal NA 1 2 #> Low 3 NA 4 #> Death NA NA NA#> to #> from Normal Low Death #> Normal NA 1 2 #> Low 3 NA 4 #> Death NA NA NAtrans.comprisk(3)#> to #> from eventfree cause1 cause2 cause3 #> eventfree NA 1 2 3 #> cause1 NA NA NA NA #> cause2 NA NA NA NA #> cause3 NA NA NA NA#> to #> from eventfree c1 c2 c3 #> eventfree NA 1 2 3 #> c1 NA NA NA NA #> c2 NA NA NA NA #> c3 NA NA NA NA#> to #> from nothing c1 c2 c3 #> nothing NA 1 2 3 #> c1 NA NA NA NA #> c2 NA NA NA NA #> c3 NA NA NA NAtrans.illdeath()#> to #> from healthy illness death #> healthy NA 1 2 #> illness NA NA 3 #> death NA NA NA#> to #> from nothing ill death #> nothing NA 1 2 #> ill NA NA 3 #> death NA NA NA