initHMM: Initialization of hidden Markov models

Description Usage Arguments Value Examples

View source: R/initHMM.R

Description

Initialization of hidden Markov models

Usage

1
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

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

STAN documentation built on Nov. 8, 2020, 11:11 p.m.