forwards_backwards: Forward Backward for homogeneous MSAR models

Description Usage Arguments Value Author(s) See Also

View source: R/forwards_backwards.R

Description

Computes the posterior (or smoothing) probabilities in an homogenenous HMM or MSAR model using the forwards backwards algo. 'filter_only' is an optional argument (default: 0). If 1, we do filtering, if 0, smoothing.

Usage

1
forwards_backwards(prior, transmat, obslik, filter_only = FALSE)

Arguments

prior

prior probabilities PRIOR(I) = Pr(X(1) = I)

transmat

transition matrice TRANSMAT(I,J) = Pr(X(T+1)=J | X(T)=I)

obslik

emission probabilities OBSLIK(I,t) = Pr(Y(t) | X(t)=I)

filter_only

optional argument (default: 0). If TRUE, we do filtering, if FALSE, smoothing (default).

Value

List including

..$gamma

smoothing probabilities P(X(t)|Y(0),...,Y(T))

..$xi

two steps smoothing probabilities P(X(t),X(t+1)|Y(0),...,Y(T))

..$loglik

log likelihood

..$M

Number of regimes

..$alpha

intermediate component in the FB algorithm (forward)

..$beta

intermediate component in the FB algorithm (backward)

Author(s)

Valerie Monbet, [email protected]

See Also

fit.MSAR, Estep.MSAR


NHMSAR documentation built on Aug. 31, 2017, 9:04 a.m.