Description Usage Arguments Value Examples
View source: R/move.HMM.state_probs.R
This function, modified from Zucchini and MacDonald (2009), computes the conditional state probabilities and posterior state probabilities (Patterson et al. 2009) using the stationary distribution as the initial distribution. It takes as input a move.HMM object.
1 |
move.HMM |
A move.HMM object containing a fitted HMM model. |
A list of conditional and posterior state probabilities. #'
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run:
#2 states, 2 dist-lognorm, wrapped normal
lmean=c(-3,-1) #meanlog parameters
sd=c(1,1) #sdlog parameters
rho<-c(0.2,0.3) # wrapped normal concentration parameters
mu<-c(pi,0) # wrapped normal mean parameters
gamma0=matrix(c(0.6,0.4,0.2,0.8),byrow=T,nrow=2)
dists=c("lognormal","wrpnorm")
nstates=2
turn=c(1,2)
params=vector("list",3)
params[[1]]=gamma0
params[[2]]=cbind(lmean,sd)
params[[3]]=cbind(mu,rho)
obs=move.HMM.simulate(dists,params,1000)
turn=c(1,2)
move.HMM=move.HMM.mle(obs,dists,params,stepm=35,iterlim=100,turn=turn)
#get conditional and posterior state probabilities
move.HMM.state_probs(move.HMM)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.