Simulates sequences from a semi-Markov model.
# S3 method for smm
simulate(object, nsim = 1, seed = NULL, ...)
An object of S3 class smm
(inheriting from the S3 class
smmnonparametric or smmparametric).
An integer or vector of integers (for multiple sequences) specifying the length of the sequence(s).
Optional. seed
for the random number generator.
If no seed
is given, then seed is set by using the command
set.seed(round(as.numeric(Sys.time()))
.
further arguments passed to or from other methods.
A list of vectors representing the sequences.
If nsim
is a single integer then a chain of that length is
produced. If nsim
is a vector of integers, then length(nsim)
sequences are generated with respective lengths.
V. S. Barbu, N. Limnios. (2008). Semi-Markov Chains and Hidden Semi-Markov Models Toward Applications - Their Use in Reliability and DNA Analysis. New York: Lecture Notes in Statistics, vol. 191, Springer.