simulate.hmma: Simulates a HMM-A.

Description Usage Arguments Value Examples

View source: R/simulate.hmma.R

Description

simulate.hmma simulates a HMM-A. The only difference between simulate.hmma and simulate.hmmspec is that this function adds the names of the nodes of the Bayesian networks to the results. The simulate.hmmspec function only uses numbers, instead of names.

Usage

1
2
## S3 method for class 'hmma'
simulate(object, nsim, seed = NULL, ...)

Arguments

object

A hmma object

nsim

An integer or vector of integers (for multiple sequences) specifying the length of the sequence(s)

seed

seed for the random number generator

...

Further arguments passed to or from other methods.

Value

A simulation with the following values

Examples

1
2
3
4
5
# Get a HMM-A (e.g. from learnModel or createHmma)
model <- learnModel(data = hmmaExampleData, amountOfStates = 2, seed = 1234)

# Simulate the data, results in 100 observation sequences of length 20.
data <- simulate(model, nsim = c(rep(20, 100)))

hmma documentation built on July 2, 2020, 12:10 a.m.