compdelta | R Documentation |
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, \cdots, m
.
compdelta(Pi)
Pi |
is the |
If the Markov chain is stationary, then the marginal distribution \delta
satisfies
\delta = \delta \Pi \,.
Obviously,
\sum_j^m \delta_j = 1.
A numeric vector of length m
containing the marginal probabilities.
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.