batchMarkUnmarkHmmLL {extBatchMarking} | R Documentation |
Log-likelihood function for combined model.
Description
This helps users check whether the function can be optimized at the given initial values before optimizing using batchMarkUnmarkOptim
. After a quick check, if NAN
or Inf
is returned, the initial values should be revisited.
Usage
batchMarkUnmarkHmmLL(
par,
data,
Umax,
nBins,
covariate_phi = NULL,
covariate_p = NULL,
choiceModel = c("model1", "model2", "model3", "model4")
)
Arguments
par |
Initial values for the parameters to be optimized over. |
data |
A capture-recapture data matrix or data frame. |
Umax |
The maximum number of the unmarked individuals in the population for capture on any occasion. |
nBins |
The number of bin size into which the matrix will be divided. |
covariate_phi |
This covariate placeholder for the parameter phi_t |
covariate_p |
This covariate placeholder for the parameter p_t |
choiceModel |
This chooses among different models and allow for model selection. |
Value
Negative Log-likelihood value of the likelihood function.
Examples
library(extBatchMarking)
theta <- c(0.1, 0.1, 7, -1.5)
res3 <- batchMarkUnmarkHmmLL(par = theta,
data = WeatherLoach,
choiceModel = "model4",
Umax = 1800,
nBins = 600,
covariate_phi = NULL,
covariate_p = NULL)
res3
[Package extBatchMarking version 1.1.0 Index]