allProbs | R Documentation |
Used in functions viterbi
, logAlpha
, logBeta
.
allProbs(
data,
nbStates,
stepDist,
angleDist,
stepPar,
anglePar = NULL,
zeroInflation = FALSE,
knownStates = NULL
)
data |
Object |
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 |
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 |
zeroInflation |
|
knownStates |
Vector of values of the state process which are known prior to fitting the model (if any). Default: NULL (states are not known). This should be a vector with length the number of rows of 'data'; each element should either be an integer (the value of the known states) or NA if the state is not known. |
Matrix of all probabilities.
## Not run:
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)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.