compdelta: Marginal Distribution of Stationary Markov Chain

Description Usage Arguments Details Value Examples

Description

Computes the marginal distribution of a stationary Markov chain with transition probability matrix Pi. The m discrete states of the Markov chain are denoted by 1, ..., m.

Usage

1

Arguments

Pi

is the m*m transition probability matrix of the Markov chain.

Details

If the Markov chain is stationary, then the marginal distribution delta satisfies

delta = delta Pi.

Obviously,

sum_j^m delta_j = 1.

Value

A numeric vector of length m containing the marginal probabilities.

Examples

1
2
3
4
5
6
7
8
Pi <- matrix(c(1/2, 1/2,   0,   0,   0,
               1/3, 1/3, 1/3,   0,   0,
                 0, 1/3, 1/3, 1/3,   0,
                 0,   0, 1/3, 1/3, 1/3,
                 0,   0,   0, 1/2, 1/2),
             byrow=TRUE, nrow=5)

print(compdelta(Pi))

Example output

[1] 0.1538462 0.2307692 0.2307692 0.2307692 0.1538462

HiddenMarkov documentation built on April 27, 2021, 5:06 p.m.