make.hmm.pars.from.Et | R Documentation |
est.hmltm
via argument hmm.pars
.make.hmm.pars.from.Et
creates 2-state hidden Markov availability model specification from
mean times unavailable (Eu) and available (Ea).
make.hmm.pars.from.Et(Ea, Eu, seEa, seEu, covEt = 0, pm = NULL)
Ea |
vector of length m>=1 specifying mean distance (=mean time * observer speed) animals are in the more available state in one cycle (e.g. dive cycle: surface-dive). |
Eu |
vector of length m>=1 specifying mean distance (=mean time * observer speed) animals are in the more UNavailable state in one cycle. |
seEa |
standard error of Ea. |
seEu |
standard error of Eu. |
covEt |
vector of length m>=1 containing covariance of each pair of Ea and Eu. |
pm |
is 2xm matrix containing state-dependent Bernoulli distribution parameters for the m pairs of Ea and Eu, with first being probability of being available when in state i (i=1,2), where i=1 is the more UNavailable state and i=2 is the more available state. |
Calculates 2-state hidden Markov model parameters such that the Markov process is in states 1 (more unavailable) and 2 (more available) for mean times Ea and Eu, with Bernoulli state-dependent response probability pm[1,] and pm[2,], respectively. Also constructs a covariance matrix for Ea and Eu. If pm[1,i]=0 and pm[2,i]=1 for animal i, the availability process is a Markov process and the states are actual unavailbile (state 1) and availabile (state 2).
@examples # Some arbitrary numbers for illustration: Ea=c(10,12);Eu=c(100,120);seEa=c(2,3);seEu=c(20,30);covEt=c(10,12) make.hmm.pars.from.Et(Ea[1],Eu[1],seEa[1],seEu[1],covEt[1]) # single animal make.hmm.pars.from.Et(Ea,Eu,seEa,seEu,covEt) # two animals
# Here's how the data porpoise.hmm.pars was created from numbers in Westgate et al. (1995): ppn=c(40,52,36,34,49,60,33)/100 # proportion of time available ET=c(76,44,52,64,70,46,103) # mean dive cycle duration seET=c(48,37,52,65,59,32,67) # SE of mean dive cycle duration cvET=seET/ET # CV of mean dive cycle duration Ea=ET*ppn # mean time available Eu=ET*(1-ppn) # mean time UNavailable # For lack of better info, assume independence of Ea and Eu, and that cv(Ea)=cv(Eu)=cv, # which means that cv=sqrt((cvET*ET)^2/(Ea^2+Eu^2)) # and hence: seEa=Ea*cv seEu=Eu*cv covEt=seET*0 # assume independence porpoise.hmm.pars=make.hmm.pars.from.Et(Ea,Eu,seEa,seEu,covEt)
# Here's how the dataset beaked.hmm.pars were created: Ea=121.824 Eu=1580.256 seEa=9.618659 seEu=134.9212 beaked.hmm.pars=make.hmm.pars.from.Et(Ea,Eu,seEa,seEu)
Westgate, A. J., Read, A. J., Berggren, P., Koopman, H. N., and Gaskin, D. E. 1995. Diving behaviour of harbour porpoises, Phocoena phocoena. Canadian Journal of Fisheries and Aquatic Sciences 52, 1064-1073.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.