Learn R Programming

packDAMipd (version 0.2.0)

define_transition_table: Define the table for transition

Description

Define the table for transition

Usage

define_transition_table(tmat)

Arguments

tmat

transition matrix in the format as in package 'mstate'

Value

the transition table with the probabilities

Details

Generating a table for transition matrix for efficient understanding and checking The transition matrix in the format as per 'mstate' package is transformed to a table. if tmat is not a square matrix, it gives error else it spells out the transition number, probability name and from state to state

Examples

Run this code
# NOT RUN {
tmat <- rbind(c(1, 2), c(3, 4))
colnames(tmat) <- rownames(tmat) <- c("Healthy", "Dead")
define_transition_table(tmat)
# }

Run the code above in your browser using DataLab