hmm_simulate_gamma_poisson_data {oHMMed} | R Documentation |
Simulate data distributed according to oHMMed with gamma-poisson emission densities
Description
Simulate data distributed according to oHMMed with gamma-poisson emission densities
Usage
hmm_simulate_gamma_poisson_data(L, mat_T, betas, alpha)
Arguments
L |
(integer) number of simulations |
mat_T |
(matrix) a square matrix with the initial state |
betas |
(numeric) |
alpha |
(numeric) |
Value
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
Examples
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
[Package oHMMed version 1.0.2 Index]