initialize the hhsmmspec model for a specified emission distribution
initialize the hhsmmspec model for a specified emission distribution
Initialize the hhsmmspec model by using an initial clustering obtained by initial_cluster and the emission distribution characterized by mstep and dens.emission
clus: initial clustering obtained by initial_cluster
mstep: the mstep function of the EM algorithm with an style simillar to that of mixmvnorm_mstep. If NULL, the mixmvnorm_mstep is considered for the complete data set and miss_mixmvnorm_mstep is considered for the data with missing values (NA or NaN)
dens.emission: the density of the emission distribution with an style simillar to that of dmixmvnorm
sojourn: one of the following cases:
"nonparametric" non-parametric sojourn distribution
"nbinom" negative binomial sojourn distribution
"logarithmic" logarithmic sojourn distribution
"poisson" poisson sojourn distribution
"gamma" gamma sojourn distribution
"weibull" weibull sojourn distribution
"lnorm" log-normal sojourn distribution
"auto" automatic determination of the sojourn distribution using the chi-square test
semi: logical and of one of the following forms:
a logical value: if TRUE all states are considered as semi-Markovian else Markovian
a logical vector of length nstate: the TRUE associated states are considered as semi-Markovian and FALSE associated states are considered as Markovian
NULL if ltr=TRUE then semi = c(rep(TRUE,nstate-1),FALSE), else semi = rep(TRUE,nstate)
M: maximum number of waiting times in each state
verbose: logical. if TRUE the outputs will be printed the normal distributions will be estimated
...: additional parameters of the mstep function
Returns
a hhsmmspec model containing the following items:
init initial probabilities of states
transition transition matrix
parms.emission parameters of the mixture normal emission (mu, sigma, mix.p)
sojourn list of sojourn time distribution parameters and its type
dens.emission the emission probability density function
mstep the M step function of the EM algorithm
semi a logical vector of length nstate with the TRUE associated states are considered as semi-Markovian