mixture_nll: Normal mixture negative Log Likelihood

View source: R/functions.R

mixture_nllR Documentation

Normal mixture negative Log Likelihood

Description

Evaluates an n-mixture model negative log-likelihood given the parameters and the observations

Usage

mixture_nll(par, obs, skeleton, returnNLL = T, DMs = list())

Arguments

par

A list of parameters including mean, sd, and probs. Alternatively, a vector of parameters, with a skeleton to relist the parameters (parameter: skeleton).

obs

A matrix of observed values.

skeleton

The skeleton to relist the parameters

returnNLL

If TRUE, returns the value of the NLL rather than the likelihood for each point individually. If FALSE, also returns the output as an nS*nT matrix.

DMs

A named list of design matrices for covariate inclusion

Value

A matrix of evaluated densities for the count at each site and location, or the single real number valued negative log likelihood


calliste-fagard-jenkin/GAI documentation built on July 26, 2022, 11:20 a.m.