Description Usage Arguments Value Examples
Compute a Matrix of Transition Counts from an Observed Sequence (First-Order)
1 | CalcTransitionCounts(event_seq, n_states = length(unique(event_seq)))
|
event_seq |
Vector of observations. |
n_states |
Total number of expected unique states. |
Matrix
n_{states} \times n_{states}
representing the number of transitions from each state to all other states.
1 2 3 | t_mat <- matrix(c(0.3, 0.7, 0.6, 0.4), 2,2, T)
sim_mc <- SimulateMarkovChain(t_mat, n_sims = 500)
tc <- CalcTransitionCounts(sim_mc)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.