R: Hidden semi-Markov model specification

hsmmspec {mhsmm} | R Documentation

## Hidden semi-Markov model specification

### Description

Creates a model specification of a hidden semi-Markov model.

### Usage

    hsmmspec(init,transition,parms.emission,sojourn,dens.emission,
    	rand.emission=NULL,mstep=NULL)

### Arguments

`init` | Distribution of states at t=1 ie. P(S=s) at t=1
`transition` | The transition matrix of the embedded Markov chain (diagonal must be 0)
`parms.emission` | A list containing the parameters of the emission distribution
`sojourn` | A list containining the parameters and type of sojourn distribtuion (see Details)
`dens.emission` | Density function of the emission distribution
`rand.emission` | The function used to generate observations from the emission distribution
`mstep` | Re-estimates the parameters of density function on each iteration

### Details

The sojourn argument provides a list containing the parameters for the available sojourn distributions. Available sojourn distributions are shifted Poisson, Gamma and non-parametric.

In the case of the Gamma distribution, sojourn is a list with vectors shape and scale (the Gamma parameters in dgamma), both of length J. Where J is the number of states. See `reprocows` for an example using Gamma sojourn distributions.

In the case of shifted Poisson, sojourn is list with vectors shift and lambda, both of length J. See `hsmmfit` for an example using shifted Poisson sojourn distributions.

In the case of non-parametric, sojourn is a list containing a M x J matrix. Where entry (i,j) is the probability of a sojourn of length i in state j. See `hsmmfit` for an example using shifted non-parametric sojourn distributions.

### Value

An object of class hsmmspec

### Author(s)

Jared O'Connell jaredoconnell@gmail.com

### References

Jared O'Connell, Soren Hojsgaard (2011). Hidden Semi Markov Models for Multiple Observation Sequences: The mhsmm Package for R., Journal of Statistical Software, 39(4), 1-22., URL http://www.jstatsoft.org/v39/i04/.

Guedon, Y. (2003), Estimating hidden semi-Markov chains from discrete sequences, Journal of Computational and Graphical Statistics, Volume 12, Number 3, page 604-639 - 2003

### See Also

`hsmmfit` ,`simulate.hsmmspec`, `predict.hsmm`

[Package mhsmm version 0.4.16 Index]