smooth.discrete {mhsmm}R Documentation

Smoothing a discrete time series.

Description

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.

Usage

smooth.discrete(y, init = NULL, trans = NULL, parms.emission = 0.5, 
                method = "viterbi", details = 0, ...)

Arguments

y

A numeric vector

init

Initial distribution (by default derived from data; see the vignette for details)

trans

Transition matrix (by default derived from data; see the vignette for details)

parms.emission

Matrix describing the conditional probabilities of the observed states given the latent states. (See the vignette for details).

method

Either "viterbi" or "smoothed". The viterbi method gives the jointly most likely sequence; the smoothed method gives the sequence of individually most likely states.

details

Controlling the amount of information printed.

...

Further arguments passed on to the "hmmfit" function.

Details

The parameters are estimated using the Baum-Welch algorithm (a special case of the EM-algorithm).

Value

A list with the following components:

s

The "smoothed" states

model

The underlying hmm (hidden Markov model) object

data

The data

initial

The initial parameters

Author(s)

S<c3><b8>ren H<c3><b8>jsgaard <sorenh at math.aau.dk>

See Also

hmmspec, hmmfit

Examples

## Please see the vignette

[Package mhsmm version 0.4.21 Index]