CalcTransitionCounts: Compute a Matrix of Transition Counts from an Observed...

Description Usage Arguments Value Examples

Description

Compute a Matrix of Transition Counts from an Observed Sequence (First-Order)

Usage

1
CalcTransitionCounts(event_seq, n_states = length(unique(event_seq)))

Arguments

event_seq

Vector of observations.

n_states

Total number of expected unique states.

Value

Matrix

n_{states} \times n_{states}

representing the number of transitions from each state to all other states.

Examples

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)

bvegetabile/ccber documentation built on May 10, 2019, 1:15 p.m.