View source: R/stationary_functions.R
stationary | R Documentation |
A homogeneous, finite state Markov chain that is irreducible and aperiodic converges to a unique stationary distribution, here called \delta
.
As it is stationary, this distribution satisfies
\delta \Gamma = \delta,
subject to \sum_{j=1}^N \delta_j = 1
,
where \Gamma
is the transition probability matrix.
This function solves the linear system of equations above.
stationary(Gamma)
Gamma |
transition probability matrix of dimension |
either a single stationary distribution of the Markov chain (vector of length N
) or a matrix of stationary distributions of dimension c(nTracks,N)
with one stationary distribution in each row
tpm
to create a transition probabilty matrix using the multinomial logistic link (softmax)
Other stationary distribution functions:
stationary_cont()
,
stationary_p()
# single matrix
Gamma = tpm(c(rep(-2,3), rep(-3,3)))
delta = stationary(Gamma)
# multiple matrices
Gamma = array(Gamma, dim = c(3,3,10))
Delta = stationary(Gamma)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.