HMM {STAN} | R Documentation

## Create a HMM object

### Description

This function creates a HMM object.

### Usage

    HMM(initProb = numeric(), transMat = matrix(numeric(), ncol = 1, nrow = 1),
      emission, nStates = numeric(), status = character(),
      stateNames = character(), dimNames = character(), LogLik = numeric())

### Arguments

`initProb` | Initial state probabilities.
`transMat` | Transition probabilities
`emission` | Emission parameters as an HMMEmission object.
`nStates` | Number of states.
`status` | of the HMM. On of c('initial', 'EM').
`stateNames` | State names.
`dimNames` | Names of data tracks.
`LogLik` | Log likelihood of a fitted HMM.

### Value

HMM

### See Also

`HMMEmission`

### Examples

    nStates = 5
    means = list(4,11,4,11,-1)
    Sigma = lapply(list(4,4,4,4,4), as.matrix)
    transMat = matrix(1/nStates, nrow=nStates, ncol=nStates)
    initProb = rep(1/nStates, nStates)
    HMM(initProb=initProb, transMat=transMat, emission=HMMEmission(type='Gaussian', parameters=list(mu=means, cov=Sigma), nStates=length(means)), nStates=nStates, status='initial')

[Package STAN version 2.10.1 Index]