nlogL = binolike(p, x, n)
[nlogL, avar] = binolike(p, x, n)
| Parameter | Description |
|---|---|
| p | scalar: binomial probability parameter. |
| x | nonnegative integer finite real nonempty array: observed successes. |
| n | nonnegative integer finite real nonempty array or scalar: trial counts. Each value must be greater than or equal to the corresponding value in x. |
| Parameter | Description |
|---|---|
| nlogL | scalar: negative log-likelihood. |
| avar | scalar: asymptotic variance estimate. |
binolike returns the negative log-likelihood for binomial distribution data and the asymptotic variance estimate.
x = [0 2 5 8 10];
n = 10;
[nlogL, avar] = binolike(0.4, x, n);
| Version | Description |
|---|---|
| 2.0.0 | initial version |