mvnHMM2 | R Documentation |
Fit multivariate Normal 2 State Hidden Markov models by EM.
mvnHMM2(
y,
cl,
formula1,
formula2,
data,
min.iters = 10,
max.iters = 50,
tol = 0.001,
verbose = interactive()
)
gmvnHMM2(
y,
cl,
gr,
formula1,
formula2,
data,
min.iters = 10,
max.iters = 50,
tol = 0.001,
verbose = interactive()
)
grmvnHMM2(
y,
cl,
gr,
formula1,
formula2,
data,
min.iters = 10,
max.iters = 100,
tol = 0.001,
verbose = interactive()
)
y |
the sequence of observations |
cl |
an integer vector allocating observations to classes |
formula1 |
formula for the logistic model relating the transition from state 1 to state 2 to the covariates |
formula2 |
formula for the logistic model relating the transition from state 2 to state 1 to the covariates |
data |
a dataframe of covariates |
min.iters |
minimum number of EM iterations |
max.iters |
maximum number of EM iterations |
tol |
tolerance for the log likelihood |
verbose |
should the log likelihood be reported. |
gr |
an integer vector allocating observations to groups |
These functions fit multivariate Normal 2 state hidden Markov models to sequences of observations, where the transition probabilities are governed by logistic regression. 'mvnHMM2' fits a hidden Markov model to a single sequence of observations. 'gmvnHMM2' and 'grmvnHMM2' fit separate Markov models to several groups (sequences) of observations. 'gmvnHMM2' fits a hidden Markov model to each group so that each state has a different mean across groups, but a common covariance. 'grmvnHMM2' constrains the means of the states to be Normally distributed across groups.
the fitted model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.