nbinlike
Negative binomial negative log-likelihood
📝Syntax
nlogL = nbinlike(params, x)
[nlogL, avar] = nbinlike(params, x, censoring, freq)
📥Input Arguments
Parameter Description
params two-element vector containing r and p.
x nonnegative integer finite real nonempty array: observed failures.
censoring array with values 0 or 1. Default is all zeros.
freq nonnegative finite array of observation frequencies. Default is all ones.
📤Output Arguments
Parameter Description
nlogL scalar: negative log-likelihood.
avar matrix: asymptotic covariance estimate.
📄Description

nbinlike returns the negative log-likelihood for negative binomial distribution data and the asymptotic covariance estimate.

💡Examples
x = [0 1 2 4 6 9 12 15];
[nlogL, avar] = nbinlike([4 0.45], x);
🔗See Also
nbinfitnbinpdfnbincdfnbinrnd
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub