View source: R/RHMMLikelihood.r
R_HMMLikelihood | R Documentation |
R implementation of HMMs described in processed report except function HMMLikelihood renamed to R_HMMLikelihood and changed to compute values for all capture histories and return lnl, alpha, phi, v, dmat, and gamma values. loglikelihood is called with a fitted hmm model and then computes the gamma,dmat and delta matrices and calls R_HMMLikelihood function. These are not used by the fitting code.
R_HMMLikelihood(x,first,m,T,dmat,gamma,delta)
loglikelihood(object,ddl=NULL)
x |
single observed sequence (capture history) |
first |
occasion to initiate likelihood calculation for sequence |
m |
number of states |
T |
number of occasions; sequence length |
dmat |
observation probability matrices |
gamma |
transition matrices |
delta |
initial distribution |
object |
fitted hmm model |
ddl |
design data list; will be computed if NULL |
both return log-likelihood, alpha, v and phi arrays
Jeff Laake
Zucchini, W. and I.L. MacDonald. 2009. Hidden Markov Models for Time Series: An Introduction using R. Chapman and Hall, Boca Raton, FL. 275p. See page 45.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.