stationary_p {LaMa} | R Documentation |
Periodically stationary distribution of a periodically inhomogeneous Markov chain
Description
Computes the periodically stationary distribution of a periodically inhomogeneous Markov chain.
Usage
stationary_p(Gamma, t = NULL, ad = NULL)
Arguments
Gamma |
array of transition probability matrices of dimension c(N,N,L) |
t |
integer index of the time point in the cycle, for which to calculate the stationary distribution If |
ad |
optional logical, indicating whether automatic differentiation with |
Details
If the transition probability matrix of an inhomogeneous Markov chain varies only periodically (with period length L
), it converges to a so-called periodically stationary distribution.
This happens, because the thinned Markov chain, which has a full cycle as each time step, has homogeneous transition probability matrix
\Gamma_t = \Gamma^{(t)} \Gamma^{(t+1)} \dots \Gamma^{(t+L-1)}
for all t = 1, \dots, L.
The stationary distribution for time t
satifies \delta^{(t)} \Gamma_t = \delta^{(t)}
.
This function calculates said periodically stationary distribution.
Value
either the periodically stationary distribution at time t or all periodically stationary distributions.
References
Koslik, J. O., Feldmann, C. C., Mews, S., Michels, R., & Langrock, R. (2023). Inference on the state process of periodically inhomogeneous hidden Markov models for animal behavior. arXiv preprint arXiv:2312.14583.
See Also
tpm_p
and tpm_g
to create multiple transition matrices based on a cyclic variable or design matrix
Other stationary distribution functions:
stationary()
,
stationary_cont()
Examples
# setting parameters for trigonometric link
beta = matrix(c(-1, 2, -1, -2, 1, -1), nrow = 2, byrow = TRUE)
Gamma = tpm_p(beta = beta, degree = 1)
# periodically stationary distribution for specific time point
delta = stationary_p(Gamma, 4)
# all periodically stationary distributions
Delta = stationary_p(Gamma)