simSeq: simSeq

Description Usage Arguments Examples

Description

Simulates a single sequence with four possible states.

Usage

1
simSeq(trans, initial, length)

Arguments

trans

a 4x4 matrix containing transition probabilities

initial

a four element vector containing initial states probabilities

length

single value specifying the length of the simulated sequence

Examples

1
2
3
4
5
6
7
8
test1<-matrix(c(0.5 , 0.2 , 0.2 , 0.1,
                0.8 , 0.05, 0.05, 0.1,
                0.5 , 0.1 , 0.2 , 0.2,
                0.1 , 0.1 , 0.1 , 0.7) , 4 , 4 , byrow = TRUE)

initial<-c(.25 , .25 , .25 , .25)

simSeq(test1, initial, 30)

DySeq documentation built on May 1, 2019, 10:14 p.m.

Related to simSeq in DySeq...