nlogL = nbinlike(params, x)
[nlogL, avar] = nbinlike(params, x, censoring, freq)
| 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. |
| Parameter | Description |
|---|---|
| nlogL | scalar: negative log-likelihood. |
| avar | matrix: asymptotic covariance estimate. |
nbinlike returns the negative log-likelihood for negative binomial distribution data and the asymptotic covariance estimate.
x = [0 1 2 4 6 9 12 15];
[nlogL, avar] = nbinlike([4 0.45], x);
| Version | Description |
|---|---|
| 2.0.0 | initial version |