apaMarkov.StateDuration.Analysis(StatePath, DoIgnoreFirstAndLastRun)
Excel
=apaMarkov.StateDuration.Analysis(StatePath, DoIgnoreFirstAndLastRun)Result
Compares the empirical state durations with the geometric duration distribution implied by an estimated Markov chain. The input states must be a row or column vector.
Syntax
StatePath: n x 1 vector of states
DoIgnoreFirstAndLastRun: TRUE to ignore the first and last runs of the state path, because they might be incomplete in a finite sample
Algorithm
The empirical run lengths of each state are estimated from StatePath, optionally excluding the first and last runs.
Remarks
The empirical duration variance is a sample variance (denominator n − 1).
