InitialLawMk: Estimation of the initial law (Markov model)

Description Usage Arguments Value Author(s) See Also Examples

View source: R/InitialLawMk.R

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

1
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

Author(s)

Vlad Stefan Barbu, barbu@univ-rouen.fr
Caroline Berard, caroline.berard@univ-rouen.fr
Dominique Cellier, dominique.cellier@laposte.net
Mathilde Sautreuil, mathilde.sautreuil@etu.univ-rouen.fr
Nicolas Vergne, nicolas.vergne@univ-rouen.fr

See Also

InitialLawMk, estimSM, simulSM, estimMk, simulMk

Examples

1
2
3
4
5
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)

Example output

Loading required package: seqinr
Loading required package: DiscreteWeibull
Loading required package: Rsolnp
Warning message:
In estimMk(seq = seq, E = c("a", "c", "g", "t"), k = 1) :
  missing transitions
$init
[1] 0.2205882 0.2205882 0.2058824 0.3529412

SMM documentation built on Jan. 31, 2020, 5:07 p.m.