LNLIKE.Ns: LOG LIKELIHOOD OF ABSOLUTE ABUNDANCE

View source: R/run_SIR.R

LNLIKE.NsR Documentation

LOG LIKELIHOOD OF ABSOLUTE ABUNDANCE

Description

This function computes two estimates of the log-likelihood of the estimated absolute abundance using the equation from Zerbini et al. 2011 (eq. 4) and a lognormal distribution from CALC.LNLIKE.

Usage

LNLIKE.Ns(Obs.N, Pred_N, start_yr, add_cv, log = TRUE)

Arguments

Obs.N

Observed absoluted abundance in numbers as a data.frame containing year, estimate of absolute abundance, and standard deviation

Pred_N

Predicted absolute abundance in numbers from GENERALIZED_LOGISTIC.

start_yr

The first year of the projection (assumed to be the first year in the catch series).

log

Return the log of the likelihood (TRUE/FALSE)

add_CV

Additional CV to add to variance of lognormal distribution sampled from priors$add_CV.

Value

A list of two numeric scalars of estimates of log-likelihood.

Examples

Obs.N  <-  data.frame(Year = 2005, Sigma = 5, Obs.N = 1000)
Pred_N  <-  1234
start_yr  <-  2005
LNLIKE.Ns(Obs.N, Pred_N, start_yr, add_cv = 0, log=TRUE)

antarctic-humpback-2019-assessment/HumpbackSIR documentation built on Nov. 6, 2023, 6:07 p.m.