hsmmsim2_exp: Simulate a hidden semi-Markov series and its underlying...

Description Usage Arguments Value References

View source: R/hsmmsim2_exp.R

Description

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

Usage

1
2
hsmmsim2_exp(prior, dtrate, dtparm, zeroparm, emitparm, tpmparm, trunc, M, n,
  dt_x = NULL, tpm_x = NULL, emit_x = NULL, zeroinfl_x = NULL)

Arguments

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.

Value

simulated series and corresponding states

References

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


ziphsmm documentation built on May 2, 2019, 6:10 a.m.