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,
  choiceModel = c("model1", "model2", "model3", "model4"),
  cores
)

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.

choiceModel

This chooses among different models and allow for model selection.

cores

The number of cores for parallelization.

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       = 20,
                             cores       = 1)
res3

[Package extBatchMarking version 1.0.1 Index]