Learn R Programming

smmR (version 1.0.3)

simulate.smmfit: Simulates semi-Markov chains

Description

Simulates sequences from a fitted semi-Markov model.

Usage

# S3 method for smmfit
simulate(object, nsim = 1, seed = NULL, ...)

Arguments

object

An object of class smmfit (inheriting from the S3 classes smm, smmnonparametric or smmparametric).

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 list of vectors representing the sequences.

Details

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.

References

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.

See Also

smmnonparametric, smmparametric, fitsmm