powered by
This function generates sequence from a MHMM model
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)
numeric, number of subjects.
numeric, length of the sequence.
list, matrices of the transition probabilities per class
numeric, proportions of the classes.
numeric, shapes of the gamma distributions.
numeric, rates of the gamma distributions.
numeric, proportions of the zero-inflated in the emission laws.
Returns a list of sequences.
# NOT RUN { ech <- rdata.mhmm(25, 10) res <- mhmm(ech$y, K = 2, M = 4, nbcores = 1, nbinit = 5, iterSmall = 2) # }
Run the code above in your browser using DataLab