Periodically stationary distribution of a periodically inhomogeneous Markov chain
stationary_p.RdComputes the periodically stationary distribution of a periodically inhomogeneous Markov chain.
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
tis not provided, the function calculates all stationary distributions for each time point in the cycle.- ad
optional logical, indicating whether automatic differentiation with
RTMBshould be used. By default, the function determines this itself.
Value
either the periodically stationary distribution at time t or all periodically stationary distributions.
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.
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)