Usage
hsmm(x, od, rd, pi.par, tpm.par, od.par, rd.par,
M = NA,
Q.max = 500,
epsilon = 1e-08,
censoring = 1,
prt = TRUE,
detailed = FALSE,
r.lim = c(0.01, 100),
p.log.lim = c(0.001, 0.999),
nu.lim = c(0.01, 100))
Arguments
x
the observed process, a vector of length $\tau$
od
character with the name of the conditional distribution of the observations:
"bern" = Bernoulli, "norm" = Normal, "pois" = Poisson, "t" = Student-t
rd
character with the name of the runlength distribution (or sojourn time, dwell time distribution):
"nonp" = Non-parametric, "geom" = Geometric, "nbinom" = Negative Binomial, "log" = Logarithmic, , "pois" = Poisson
pi.par
vector of length $J$ with the initial values for the initial probabilities of the semi-Markov chain
tpm.par
matrix of dimension $J x J$ with the initial 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 initial values for the parameters of the runlength distributions.
See further details below (section 'List Objects rd.par and od.par')
od.par
list with the initial values for the parameters of the conditional observation distributions.
See further details below (section 'List Objects rd.par and od.par')
M
positive integer containing the maximum runlength
Q.max
positive integer containing the maximum number of iterations
epsilon
positive scalar giving the tolerance at which the relative change of
log-likelihood is considered close enough to zero to terminate the algorithm.
censoring
integer. if equal to $1$, the last visited state contributes to the likelihood.
If equal to $0$, the partial likelihood estimator, which ignores the contribution of the last visited state, is used.
For details see
prt
logical. if TRUE, the log-likelihood and number of iterations carried out are printed for each iteration
detailed
logical. if TRUE, a list of the parameters at every iteration step is written into the ctrl
list
r.lim
upper and lower bound for the r parameter of the negative binomial distribution in the M-step,
bisection is applied to determine this parameter
p.log.lim
upper and lower bound for the parameter of the logarithmic distribution in the M-step,
bisection is applied to determine this parameter
nu.lim
upper and lower bound for the degrees of freedom of parameter of the t distribution in the M-step,
bisection is applied to determine this parameter
List Objects rd.par and od.par
The list objects rd.par
and od.par
contain parameter values for the runlength and conditional
observation distribution, respectively. For a model with $J$ states, the length of all parameter vectors
is equal to $J$. For non-parametric runlength distribution, the corresponding entry is
a matrix of dimension $M x J$.
The names of the list entries have to be as follows.
od.par
"bern" (Bernoulli): "b"
"norm" (Normal): "mean", "var"
"pois" (Poisson): "lambda"
"t" (Student-t): "mean", "var", "df"
rd.par
"nonp" (Non-parametric): "np"
"geom" (Geometric): "p"
"nbinom" (Negative Binomial): "r", "pi"
"log" (Logarithmic): "p"
"pois" (Poisson): "lambda"