Home   >   User Resources   >   Online Help   >   apaMarkov.HigherOrder.StatePath.FromStatePath
 

 

Function index Version 3.0.0

apaMarkov.HigherOrder.StatePath.FromStatePath(StatePath, Order)

Excel=apaMarkov.HigherOrder.StatePath.FromStatePath(StatePath, Order)

Result

Derives the higher-order state path from a state path and an order.

Syntax

StatePath: n x 1 vector containing the state path

Order: order of the new path

Algorithm

Transform the original first‑order state sequence into a higher‑order sequence by grouping consecutive states into composite states of length Order. For example, for order 2, the path (1,2,3,… )\left( 1,2,3,\ldots\text{ } \right)becomes (1 ⁣− ⁣2,2 ⁣− ⁣3,… )\left( 1\text{ }\text{⁣} - \text{ }\text{⁣}2,2\text{ }\text{⁣} - \text{ }\text{⁣}3,\ldots\text{ } \right). Return the resulting higher‑order state path as numeric state identifiers.