simulate.hsmmspec {mhsmm}R Documentation

Simulation for HSMMs

Description

Simulates values for a specified hidden semi-Markov model

Usage

## S3 method for class 'hsmmspec':
simulate(object, nsim, seed = NULL,r=NULL,...)

Arguments

object A hsmmspec 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
r The function used to generate observations from the emission distribution
... further arguments passed to or from other methods.

Details

If nsim is a single integer then a HSMM of that length is produced. If nsim is a vector of integers, then length(nsim) sequences are generated with respective lengths.

Value

An object of class hmmdata

x A vector of length sum(N) - the sequence(s) of observed values
s A vector of length sum(N) - the sequence(s) of hidden states
N A vector of the length of each observation sequence (used to segment x and s)

Author(s)

Jared O'Connell

References

Guedon, Y. (2003), Estimating hidden semi-Markov chains from discrete sequences, Journal of Computational and Graphical Statistics, Volume 12, Number 3, page 604-639 - 2003

See Also

hsmm, simulate.hsmmspec, predict.hsmm


[Package mhsmm version 0.3.1 Index]