Learn R Programming

hsmm (version 0.3-2)

hsmm.smooth: Hidden Semi-Markov Models

Description

Decoding states in Hidden Semi-Markov Models

Usage

hsmm.smooth(x, 
                    od, 
                    rd, 
                    pi.par,
                    tpm.par,
                    od.par,
                    rd.par,
                    M = NA)

Arguments

x
the observed process, a vector of length $\tau$
od
character containing the name of the conditional distribution of the observations. For details see hsmm
rd
character containing the name of the runlength distribution (or sojourn time, dwell time distribution). For details see hsmm
pi.par
vector of length $J$ containing the values for the intitial probabilities of the semi-Markov chain
tpm.par
matrix of dimension $J x J$ containing the parameter values for the transition probability matrix of the embedded Markov chain. The diagonal entries must all be zero, absorbing states are not permitted
rd.par
list with the values for the parameters of the runlength distributions. For details see hsmm
od.par
list with the values for the parameters of the conditional observation distributions. For details see hsmm
M
positive integer containing the maximum runlength

Value

  • call
  • {call}
  • smooth.probmatrix of dimension $J \times \tau$ containing the smoothed probabilities
  • path
  • {vector of length $\tau$ containing sequence of the states with the highest probabilities}

Details

The function hsmm.smooth calculates the so-called smoothed probabilities $$P(S_t = i | X_0, ... , X_{\tau-1)}$$ for all $t \in 0, ... , \tau-1$ and $i \in 0,...,J-1$. This procedure is often termed 'local decoding'. The sequence of the most probable states follows directly. Note that this sequence is not necessarily the most probable state sequence, which is determined by the Viterbi algorithm.

See Also

hsmm, hsmm.sim, hsmm.viterbi