Description Usage Arguments Value References See Also Examples
This function creates an object of S3
class mhmm
,
which contains the elements of a Hidden Markov Model with
multivariate response whose components can be correlated through a
gaussian copula.
1 2 3 |
Obs |
a n x p matrix containing the data. |
bT |
the vector of the beginning times for the statistical units. |
nStates |
an integer representing the number of state of the Hidden Markov Model. |
nu |
a vector of the initial probabilities of the Hidden Markov Model. |
A |
the transition matrix of the Hidden Markov Model. |
corr |
an array containing a number of matrix equal to the number of states for the gaussian copula distribution |
params |
a list containing the state-dependent parameters of the Hidden Markov Model. Each element of the list corresponds to a component of the response vector. Each element of the list is a n x d matrix, where n is the number of states of the HMM while d is the number of parameters of the specified distribution. |
distr |
a vector containing the name of the distribution for each component, "gaussian" for the normal distribution, "gamma" for the gamma distribution, "exp" for the exponential distribution |
The function returns an object of S3
class mhmm
, containing the initialization and the data of your HMM
Martino A., Guatteri, G. and Paganoni A. M., Multivariate Hidden Markov Models for disease progression, Mox Report 59/2018, 2018
1 2 3 4 5 6 7 8 9 | data(copulahmmdata)
Obs <- copulahmmdata
n <- 20 #number of observations per statistical unit
n_tot <- dim(Obs)[1]
bt <- seq(1, n_tot, by = n)
distr <- c("exp", "gaussian")
#Initialize the HMM
hmm <- set_mhmm(Obs, bT = bt, nStates = 2, distr = distr)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.