batchMarkHmmLL {extBatchMarking}R Documentation

Log-likelihood function for marked model.

Description

This helps users check whether the function can be optimized at the given initial values before optimizing using batchMarkOptim. After a quick check, if NAN or Inf is returned, the initial values should be revisited.

Usage

batchMarkHmmLL(
  par = NULL,
  data,
  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.

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 allows for model selection

Value

Negative Log-likelihood value of the likelihood function

Examples

library(extBatchMarking)
# Initial parameter
theta <- c(0, -1)
res1  <- batchMarkHmmLL(par          = theta,
                       data          = WeatherLoach,
                       choiceModel   = "model4",
                       covariate_phi = NULL,
                       covariate_p   = NULL)
res1


[Package extBatchMarking version 1.1.0 Index]