The moves of people between states (regions, institutions, security levels) from their sequence of records: the counts and probabilities of each move between consecutive records of the same person, the stationary distribution of the chain (where the population would settle if the probabilities held), the share of moves that stay in their state, and the Theil index of the moves between states (0 when they spread evenly over the pairs of states, higher when a few pairs carry them).
Value
An object of class trnmat, a list: count and prob, the
matrices of moves from (rows) and to (columns); pi, the stationary
distribution (NA when a state is never left or it is not unique);
and summ (moves, stay, theil).