# NOT RUN {
data(SEsamples)
# standard errors
bootses <- apply(SEsamples,2,sd)
bootses[which(bootses==0)] <- NA
bootses
# compare with standard errors from finite differences
library(hmmr)
data(simplehmm)
# define the model
set.seed(214)
mod1 <- depmix(obs~1,data=simplehmm,nstates=2,
family=multinomial("identity"), respst=c(.6,0,.4,0,.2,.8), trst=runif(4), inst=c(1,0))
# fit the model
fm1 <- fit(mod1,emcontrol=em.control(random.start=FALSE))
ses <- cbind(standardError(fm1),bootses)
ses
# }
Run the code above in your browser using DataLab