Learn R Programming

mapfit (version 0.9.7)

erhmm-class: Class of ER-HMM

Description

Parameters for an ER-HMM (Hidden Markov Model with Erlang outputs).

Arguments

Objects from the Class

Objects are usually created by an erhmm.

Slots

size:

the number of HMM states.

alpha:

a vector of initial probabilities for HMM states.

shape:

shape parameters for Erlang distributions. The sum of shape parameters is the number of phases of MAP.

rate:

rate parameters for Erlang distributions.

P:

an object of Matrix class for a transition probability matrix of HMM.

See Also

Classes '>map and '>gmmpp.

Examples

Run this code
# NOT RUN {
## create an ER-HMM consisting of two Erlang components with
## shape parameters 2 and 3.
erhmm(c(2,3))

## create an ER-HMM consisting of two Erlang components with
## shape parameters 2 and 3.
erhmm(shape=c(2,3))

## create an ER-HMM with specific parameters
(param <- erhmm(shape=c(2,3), alpha=c(0.3,0.7),
                rate=c(1.0,10.0),
                P=rbind(c(0.3, 0.7), c(0.1, 0.9))))

## convert to a general MAP
as(param, "map")

## marginal moments of MAP
map.mmoment(k=3, map=as(param, "map"))

## joint moments of MAP
map.jmoment(lag=1, map=as(param, "map"))

## k-lag correlation
map.acf(map=as(param, "map"))

# }

Run the code above in your browser using DataLab