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)
Arguments
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. names should have the same length as the list x (for transMat), or either K or K+1 (for trans.comprisk), or 3 (for trans.illdeath)
Returns
A transition matrix describing the states and transitions in the multi-state model.
Details
If names is missing, the names "eventfree", "cause1", etcetera are assigned in trans.comprisk, or "healthy", "illness", "death" in trans.illdeath.