| sim_lhmm | R Documentation | 
sim_lhmm generate n action sequences from LHMM based on given parameters.
The lengths of the generated sequences are simulated from a Poission distribution with
mean mean_len and at least min_len. The latent trait is generated from standard
normal.
sim_lhmm(n, paras, min_len, mean_len, return_state = TRUE)
n | 
 number of action sequences to be generated  | 
paras | 
 a list containing specified LHMM parameters:   | 
min_len | 
 minimum length of generated sequences  | 
mean_len | 
 mean length of generated sequences  | 
return_state | 
 logical. Whether generated hidden state sequences should be returned or not.  | 
If return_state = TRUE, sim_hmm returns a list of three elements
seqs  |  a list of n generated action sequences  | 
theta  |  latent traits as a vector of length n  | 
state_seqs  |  a list of n hidden state sequences
 | 
If return_state = FALSE, the returned list only contains seqs and theta.
paras <- sim_lhmm_paras(5,2)
sim_data <- sim_lhmm(20, paras, 4, 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.