hmm_simulate_normal_data {oHMMed} | R Documentation |
Simulate data distributed according to oHMMed with normal emission densities
Description
Simulate data distributed according to oHMMed with normal emission densities
Usage
hmm_simulate_normal_data(L, mat_T, means, sigma)
Arguments
L |
(integer) number of simulations |
mat_T |
(matrix) a square matrix with the initial state |
means |
(numeric) |
sigma |
(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_T0 <- 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
means0 <- c(-1,0,1)
sigma0 <- 1
sim_data <- hmm_simulate_normal_data(L = L,
mat_T = mat_T0,
means = means0,
sigma = sigma0)
plot(density(sim_data$data), main = "Density of Simulated Normal Data")
sim_data
[Package oHMMed version 1.0.2 Index]