m <- example$m
trProbs <- getTrProbs(m)
# equivalent
trProbs <- getTrProbs(m$data,nbStates=2,beta=m$mle$beta,formula=m$conditions$formula)
if (FALSE) {
# calculate SEs and 95% CIs
trProbsSE <- getTrProbs(m, getCI=TRUE)
# plot estimates and CIs for each state transition
par(mfrow=c(2,2))
for(i in 1:2){
for(j in 1:2){
plot(trProbsSE$est[i,j,],type="l",
ylim=c(0,1), ylab=paste(i,"->",j))
arrows(1:dim(trProbsSE$est)[3],
trProbsSE$lower[i,j,],
1:dim(trProbsSE$est)[3],
trProbsSE$upper[i,j,],
length=0.025, angle=90, code=3, col=gray(.5), lwd=1.3)
}
}
# limit calculations to first 10 observations
trProbsSE_10 <- getTrProbs(m, getCI=TRUE, covIndex=1:10)
}
Run the code above in your browser using DataLab