Description Usage Arguments Value Examples
View source: R/model_functions.R
Check the tranisition probabilties row sum is 1
1 | check_trans_prob(trans_mat)
|
trans_mat |
transition matrix |
rowsum if they add upto 1 else error
1 2 3 4 | tmat <- rbind(c(1, 2), c(3, 4))
colnames(tmat) <- rownames(tmat) <- c("Healthy", "Dead")
tm <- transition_matrix(2, tmat, list_prob = c(0.5, 0.5, 0, 1))
check_trans_prob(tm)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.