Learn R Programming

hsmm (version 0.3-4)

hsmm: Hidden Semi-Markov Models

Description

Simulating Hidden Semi-Markov Models

Usage

hsmm.sim(tau,
                od, 
                rd, 
                pi.par,
                tpm.par,
                od.par,
                rd.par,
                M = NA,
                seed = NULL)

Arguments

tau
positive integer containing number of observations to simulate
od
character containing the name of the conditional distribution of the observations. For details see hsmm
rd
character containing the name of the runlength distribution (or sojourn time, dwell time distribution). For details see hsmm
pi.par
vector of length $J$ containing the values for the intitial probabilities of the semi-Markov chain
tpm.par
matrix of dimension $J x J$ containing the parameter values for the transition probability matrix of the embedded Markov chain. The diagonal entries must all be zero, absorbing states are not permitted
rd.par
list with the values for the parameters of the runlength distributions. For details see hsmm
od.par
list with the values for the parameters of the conditional observation distributions. For details see hsmm
M
positive integer containing the maximum runlength
seed
integer. Seed for the random number generator

Value

  • callcall
  • obs
  • {vector of length the $\tau$ containing simulated observations}
  • pathvector of length the $\tau$ containing the simulated underlying semi-Markov chain

Details

The function hsmm.sim simulates the observations and the underlying state sequence of a Hidden Semi-Markov Model. Simulation requires the determination of the runlength and the conditional observation distributions as well as all parameters. Note: The simulation of t-distributed conditional observations carries out the function rmt, which is extracted from the package csampling (by Alessandra R. Brazzale).

See Also

hsmm, hsmm.smooth, hsmm.viterbi