Skip to contents

Evaluate the gamma-function extension of the multinomial log likelihood without dispatching numeric inputs to stats::dmultinom(). This keeps the ordinary numeric REPORT() path identical to the automatic-differentiation objective when effective counts are fractional.

Usage

dmultinom_fractional(x, prob, log = FALSE)

Arguments

x

Non-negative observed effective counts.

prob

Non-negative cell probabilities with the same length as x.

log

Return the log pseudo-likelihood when TRUE.

Value

A scalar density or log pseudo-likelihood.

Details

During RTMB simulation, the observed effective total is rounded to the nearest integer before drawing a multinomial replicate. This affects simulated diagnostics only; fitted and reported log likelihoods retain the exact fractional effective counts. Discrete one-step-ahead residuals are not defined for fractional effective counts.