fitBM_mhmm: Baum-Welch Function for multivariate data

Description Usage Arguments Value References Examples

View source: R/BMmHMM.R

Description

This function is based on an EM algorithm (the Baum-Welch algorithm) and computes the parameters of a HMM for functional data, returning an object of S3 class mhmm.

Usage

1

Arguments

hmm

a hmm object obtained from set.mhmm

Value

The function returns all the parameters of a HMM, computed via Baum-Welch algorithm: the vector of initial probabilities, the transition matrix, the parameters of the distributions related to the states and the value of the log-likelihood.

References

Martino A., Guatteri, G. and Paganoni A. M., Multivariate Hidden Markov Models for disease progression, Mox Report 59/2018, 2018

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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)

# Compute the parameters of the HMM with the Baum-Welch algorithm
bw <- fitBM_mhmm(hmm)

hmmhdd documentation built on Sept. 4, 2019, 5:03 p.m.

Related to fitBM_mhmm in hmmhdd...