initHMM {STAN} | R Documentation

## Initialization of hidden Markov models

### Description

Initialization of hidden Markov models

### Usage

    initHMM(obs, nStates, method, sizeFactors = matrix(1, nrow = length(obs), ncol = ncol(obs[[1]])), sharedCov = FALSE)

### Arguments

`obs` | The observations. A list of one or more entries containing the observation matrix (`numeric`) for the samples (e.g. chromosomes).
`nStates` | The number of states.
`method` | Emission distribution of the model. One out of c("NegativeBinomial", "PoissonLogNormal", "NegativeMultinomial", "ZINegativeBinomial", "Poisson", "Bernoulli", "Gaussian", "IndependentGaussian")
`sizeFactors` | Library size factors for Emissions PoissonLogNormal or NegativeBinomial as a length(obs) x ncol(obs[[1]]) matrix.
`sharedCov` | If TRUE, (co-)variance of (Independent)Gaussian is shared over states. Only applicable to 'Gaussian' or 'IndependentGaussian' emissions. Default: FALSE.

### Value

A HMM object.

### Examples

    data(example)
    hmm_ex = initHMM(observations, nStates=3, method="Gaussian")

[Package STAN version 2.14.0 Index]