Description Usage Arguments Value References

Simulate a hidden semi-Markov series and its underlying states with covariates

1 2 |

`prior` |
a vector of prior probabilities |

`dtrate` |
a vector for the scale parameters in the base exponential density for the latent state durations. |

`dtparm` |
a matrix of coefficients for the accelerated failure time model in each latent state |

`zeroparm` |
a vector of regression coefficients for the structural zero proportion in state 1 |

`emitparm` |
a matrix of regression coefficients for the Poisson regression in each state |

`tpmparm` |
a vector of coefficients for the multinomial logistic regression in the transition probabilities |

`trunc` |
a vector |

`M` |
number of latent states |

`n` |
length of the simulated series |

`dt_x` |
if dt_dist is "nonparametric", then dt_x is the matrix of nonparametric state durataion probabilities. Otherwise, dt_x is matrix of covariates for the dwell time distribution parameters in log-series or shifted-poisson distributions.Default to NULL. |

`tpm_x` |
matrix of covariates for transition probability matrix (excluding the 1st column). Default to NULL. |

`emit_x` |
matrix of covariates for the log poisson means. Default to NULL. |

`zeroinfl_x` |
matrix of covariates for the nonzero structural zero proportions. Default to NULL. |

simulated series and corresponding states

Walter Zucchini, Iain L. MacDonald, Roland Langrock. Hidden Markov Models for Time Series: An Introduction Using R, Second Edition. Chapman & Hall/CRC

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.