pmeskeleton | R Documentation |
Constructs the skeleton of a linear predictor list for partial Markov influences on basis of the transition-type definition matrix.
pmeskeleton(tmat)
tmat |
a transition-type definition matrix. This is a square matrix containing the boolean information of which exit state-types (the columns) are reachable from which entry state-type (the lines). |
The example below provides an intuitive description of how to suitably set up the input arguments.
An incomplete (therefore the function name ends with 'skeleton')
linear predictor list as used for the partial.markov.eta
input
argument in the function simeventhistories
.
Holger Reulen
## Two state-type model with transient state-types 1 and 2: tra2 <- matrix(ncol = 2, nrow = 2, data = FALSE) tra2[1, 2] <- tra2[2, 1] <- TRUE pmeskeleton(tmat = tra2) ## Illness-death model (IDM) with recovery: traIDM <- matrix(nrow = 3, ncol = 3, FALSE) traIDM[1, 2] <- traIDM[1, 3] <- traIDM[2, 1] <- traIDM[2, 3] <- TRUE pmeskeleton(tmat = traIDM)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.