stateprobs_g {LaMa} | R Documentation |
Calculate conditional local state probabilities for inhomogeneous HMMs
Description
Computes
\Pr(S_t = j \mid X_1, ..., X_T)
Usage
stateprobs_g(delta, Gamma, allprobs)
Arguments
delta |
Initial distribution of length N |
Gamma |
Array of transition probability matrices of dimension c(N,N,n-1), as in a time series of length n, there are only n-1 transitions. |
allprobs |
Matrix of state-dependent probabilities/ density values of dimension c(n, N) |
Value
Matrix of conditional state probabilities of dimension c(n,N)
Examples
Gamma = tpm_g(runif(99), matrix(c(-1,-1,1,-2), nrow = 2, byrow = TRUE))
delta = c(0.5, 0.5)
allprobs = matrix(runif(200), nrow = 100, ncol = 2)
probs = stateprobs_g(delta, Gamma, allprobs)
[Package LaMa version 1.0.0 Index]