stateprobs_p {LaMa} | R Documentation |
Calculate conditional local state probabilities for periodically inhomogeneous HMMs
Description
Computes
\Pr(S_t = j \mid X_1, ..., X_T)
Usage
stateprobs_p(delta, Gamma, allprobs, tod)
Arguments
delta |
Initial or periodically stationary distribution of length N |
Gamma |
Array of transition probability matrices of dimension c(N,N,L) where L is the cycle length. |
allprobs |
Matrix of state-dependent probabilities/ density values of dimension c(n, N) |
tod |
(Integer valued) time variable in 1, ..., L, mapping the data index to a generalized time of day (length n). For half-hourly data L = 48. It could, however, also be day of year for daily data and L = 365. |
Value
Matrix of conditional state probabilities of dimension c(n,N)
Examples
L = 24
beta = matrix(c(-1, 2, -1, -2, 1, -1), nrow = 2, byrow = TRUE)
Gamma = tpm_p(1:L, L, beta, degree = 1)
delta = stationary_p(Gamma, 1)
allprobs = matrix(runif(200), nrow = 100, ncol = 2)
tod = rep(1:24, 5)[1:100]
probs = stateprobs_p(delta, Gamma, allprobs, tod)
[Package LaMa version 1.0.0 Index]