# NOT RUN {
# Set the model parameters
n <- c("First","Second")
m <- c("A","T","C","G")
A <- matrix(c(0.8,0.2,
0.1,0.9),
nrow = 2,
byrow = TRUE)
B <- matrix(c(0.2, 0.2, 0.3, 0.3,
0.4, 0.4, 0.1, 0.1),
nrow = 2,
byrow = TRUE)
Pi <- c(0.5, 0.5)
params <- list( "Model" = "HMM",
"StateNames" = n,
"ObservationNames" = m,
"A" = A,
"B" = B,
"Pi" = Pi)
HMM <- verifyModel(params)
# Data simulation
set.seed(100)
length <- 100
observationSequence <- generateObservations(HMM, length)
# }
Run the code above in your browser using DataLab