Learn R Programming

packDAMipd (version 1.1.0)

define_transition_table: Define the table for transition

Description

Define the table for transition

Usage

define_transition_table(tmat)

Value

the transition table with the probabilities

Arguments

tmat

transition matrix in the format as in package 'mstate'

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
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