# InitialLawMk: Estimation of the initial law (Markov model) In SMM: Simulation and Estimation of Multi-State Discrete-Time Semi-Markov and Markov Models

## 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)

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

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