Learn R Programming

rphast (version 1.6.9)

hmm: Create an rphast HMM object

Description

Create a new HMM object

Usage

hmm(trans.mat, eq.freq = NULL, begin.freq = NULL, end.freq = NULL)

Arguments

trans.mat

A square matrix object of dimension n x n where n is the number of states, and element [i,j] is the rate of transition from state i to state j

eq.freq

A vector of length n giving the equilibrium frequencies of each state. If NULL, calculate equilibrium frequencies that will make a reversible markov chain.

begin.freq

A vector of length n giving the initial state frequencies. If NULL, use equilibrium frequencies.

end.freq

A vector of length n giving the final state frequencies. If NULL, do not condition on end frequencies.

Examples

Run this code
# NOT RUN {
h <- hmm(matrix(1, nrow=4, ncol=4))
h
# }

Run the code above in your browser using DataLab