Displaying 2 results from an estimated 2 matches for "inithmm".
Did you mean:
init_mm
2013 Apr 16
1
HMM Package parameter estimation
...ppreciated?
library(HMM)
## DECLARE PARAMETERS OF THE KNOWN MODEL
states = c(1,2,3)
symbols = c(1,2)
startProb = c(0.5,0.25,0.25)
transProb = matrix(c(0.8,0.05,0.15,0.2,0.6,0.2,0.2,0.3,0.5),3,3,TRUE)
emissionProb = matrix(c(0.9,0.1,0.2,0.8,0.7,0.3), 3,2,TRUE)
# CREATE THE KNOWN MODEL
hmmTrue = initHMM(states, symbols, startProb, transProb , emissionProb)
# SIMULATE 1000 OBSERVATIONS OF THE KNOWN MODEL
observation = simHMM(hmmTrue, 1000)
obs = observation$observation
#ESTIMATE A MODEL USING THE OBSERVATIONS GENERATED FROM THE KNOWN MODEL
hmmInit = initHMM(states, symbols, c(1/3,1/3,1/3))
hmmFit...
2011 Jul 27
1
Hidden Markov Models in R
...when they were in fact correct). Once the person achieves
the criterion of 9/10 correct responses the contigencies reverse. I am
confused on how to set up my states, symbols, starting probabilities,
transition probabilities, and emission probabilities in R. This is what I
have so far.
hmm <- initHMM(c("stay", "switch"), c("correct", "incorrect"), c(.5, .5),
matrix(c(.9, .1, .1, .9),2), matrix(c(.2, .8, .8, .2), 2))
dat$test <- ifelse(dat$Slide1_ACC == 0, "incorrect", "correct")
viterbi(hmm, dat$test)
The sequence of observation...