The smooth.discrete() function provides a simple smoothing of a time series of discrete values measured at equidistant times. Under the hood of smooth.discrete() is a hidden Markov model.
smooth.discrete(y, init = NULL, trans = NULL, parms.emission = 0.5,
method = "viterbi", details = 0, ...)
A list with the following components:
The "smoothed" states
The underlying hmm (hidden Markov model) object
The data
The initial parameters
A numeric vector
Initial distribution (by default derived from data; see the vignette for details)
Transition matrix (by default derived from data; see the vignette for details)
Matrix describing the conditional probabilities of the observed states given the latent states. (See the vignette for details).
Either "viterbi" or "smoothed". The viterbi method gives the jointly most likely sequence; the smoothed method gives the sequence of individually most likely states.
Controlling the amount of information printed.
Further arguments passed on to the "hmmfit" function.
S<c3><b8>ren H<c3><b8>jsgaard <sorenh at math.aau.dk>
The parameters are estimated using the Baum-Welch algorithm (a special case of the EM-algorithm).
hmmspec
, hmmfit