hmm_simulate_gamma_poisson_data | R Documentation |
Simulate data distributed according to oHMMed with gamma-poisson emission densities
hmm_simulate_gamma_poisson_data(L, mat_T, betas, alpha)
L |
(integer) number of simulations |
mat_T |
(matrix) a square matrix with the initial state |
betas |
(numeric) |
alpha |
(numeric) |
Returns a list with the following elements:
data
: numeric vector with data
states
: an integer vector with "true" hidden states used to generate the data vector
pi
: numeric vector with prior probability of states
mat_T <- rbind(c(1-0.01, 0.01, 0),
c(0.01, 1-0.02, 0.01),
c(0, 0.01, 1-0.01))
L <- 2^7
betas <- c(0.1, 0.3, 0.5)
alpha <- 1
sim_data <- hmm_simulate_gamma_poisson_data(L = L,
mat_T = mat_T,
betas = betas,
alpha = alpha)
hist(sim_data$data,
breaks = 40,
main = "Histogram of Simulated Gamma-Poisson Data",
xlab = "")
sim_data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.