Learn R Programming

moveHMM (version 1.0)

allProbs: Matrix of all probabilities

Description

Used in functions viterbi, logAlpha, logBeta.

Usage

allProbs(data, nbStates, stepDist, angleDist, stepPar, anglePar = NULL,
  zeroInflation = FALSE)

Arguments

data
Object moveData.
nbStates
Number of states of the HMM.
stepDist
Name of the distribution of the step lengths.
angleDist
Name of the distribution of the turning angles. Set to "none" if the angle distribution should not be estimated.
stepPar
Parameters of the step length distribution. Must be provided in a matrix with one row for each parameter (in the order expected by the pdf of stepDist), and one column for each state.
anglePar
Parameters of the turning angle distribution. Must be provided in a matrix with one row for each parameter (in the order expected by the pdf of angleDist), and one column for each state. Default: NULL ; if the turning angles dist
zeroInflation
TRUE if the step length distribution is inflated in zero. Default: FALSE.

Value

  • Matrix of all probabilities.

Examples

Run this code
stepPar <- c(1,10,1,5,0.2,0.3)
anglePar <- c(0,pi,0.5,2)
stepDist <- "gamma"
angleDist <- "vm"
data <- simData(nbAnimals=5,nbStates=2,stepDist=stepDist,angleDist=angleDist,stepPar=stepPar,
                 anglePar=anglePar,nbCovs=2,zeroInflation=TRUE)
P <- allProbs(data=data,nbStates=2,stepDist=stepDist,angleDist=angleDist,
               stepPar=matrix(stepPar,ncol=2,byrow=TRUE),anglePar=matrix(anglePar,ncol=2,
               byrow=TRUE),zeroInflation=TRUE)

Run the code above in your browser using DataLab