rdata.mhmm: Generator

Description Usage Arguments Value Examples

View source: R/rmodel.R

Description

This function generates sequence from a MHMM model

Usage

1
2
3
4
rdata.mhmm(n = 50, nbT = 40, A = list(matrix(c(0.7, 0.3, 0.1, 0.2,
  0.6, 0.1, 0.1, 0.1, 0.8), 3, 3), matrix(1/3, 3, 3)),
  delta = rep(1/length(A), length(A)), a = c(1, 2, 3) * 10, b = c(1,
  1, 1), eps = c(0.5, 0.1, 0.2) * 0)

Arguments

n

numeric, number of subjects.

nbT

numeric, length of the sequence.

A

list, matrices of the transition probabilities per class

delta

numeric, proportions of the classes.

a

numeric, shapes of the gamma distributions.

b

numeric, rates of the gamma distributions.

eps

numeric, proportions of the zero-inflated in the emission laws.

Value

Returns a list of sequences.

Examples

1
2
ech <- rdata.mhmm(25, 10)
res <- mhmm(ech$y, K = 2, M = 4, nbcores = 1, nbinit = 5, iterSmall = 2)

MHMM documentation built on March 26, 2020, 7:46 p.m.