Learn R Programming

SMM (version 1.0.2)

InitialLawMk: Estimation of the initial law (Markov model)

Description

For order 1, estimation of initial law by computing the stationary law of the Markov chain.

For order greater than 1, estimation of initial law by computing the state frequencies.

Usage

InitialLawMk(E, seq, Ptrans, k)

Arguments

E

Vector of state space

seq

List of sequence(s)

Ptrans

Matrix of transition probabilities of size (S^(k))xS, with S = length(E)

k

Order of the Markov chain

Value

init

Vector of the initial law

See Also

InitialLawMk, estimSM, simulSM, estimMk, simulMk

Examples

Run this code
# NOT RUN {
seq = list(c("a","c","c","g","t","a","a","a","a","g","c","t","t","t","g"))
res = estimMk(seq = seq, E = c("a","c","g","t"), k = 1)
p = res$Ptrans

InitialLawMk(E = c("a","c","g","t"), seq = seq, Ptrans = p, k = 1)
# }

Run the code above in your browser using DataLab