Learn R Programming

LaMa (version 1.0.0)

stateprobs: Calculate conditional local state probabilities for homogeneous HMMs

Description

Computes

\(\Pr(S_t = j \mid X_1, ..., X_T)\)

Usage

stateprobs(delta, Gamma, allprobs)

Value

Matrix of conditional state probabilities of dimension c(n,N)

Arguments

delta

Initial or stationary distribution of length N

Gamma

Transition probability matrix of dimension c(N,N)

allprobs

Matrix of state-dependent probabilities/ density values of dimension c(n, N)

Examples

Run this code
Gamma = tpm(c(-1,-2))
delta = stationary(Gamma)
allprobs = matrix(runif(200), nrow = 100, ncol = 2)

probs = stateprobs(delta, Gamma, allprobs)

Run the code above in your browser using DataLab