hmm.discnp (version 0.1-7)

fitted.hmm.discnp: Fitted values of a discrete non-parametric hidden Markov model.

Description

Calculates the fitted values of a discrete non-parametric hidden Markov model as the conditional expectations of the observations, given the entire observation sequence (and the estimated parameters of the model.

Usage

## S3 method for class 'hmm.discnp':
fitted(object, ...)

Arguments

object
An object of class hmm.discnp as returned by hmm().
...
Not used.

Value

  • If the observations (stored in object) consist of a single sequence, then the object returned is the corresponding sequence of fitted values. If the observations consist of a list of observation sequences, then the object returned is a list of corresponding sequences of fitted values.

Details

This function is essentially a wrapper for sp().

See Also

sp()

Examples

Run this code
# See the help for sim.hmm() for how to generate y.num.
fit.num <- hmm(y.num,K=2,verb=TRUE)
fv      <- fitted(fit.num)

Run the code above in your browser using DataCamp Workspace