nlogL = gamlike(params, x)
[nlogL, avar] = gamlike(params, x, censoring, freq)
| Parameter | Description |
|---|---|
| params | two-element vector: shape and scale parameters. |
| x | positive finite real nonempty array: sample data. |
| censoring | array containing 0 or 1 values: right-censoring flags. |
| freq | array of nonnegative finite values: observation frequencies. |
| Parameter | Description |
|---|---|
| nlogL | scalar: negative log-likelihood. |
| avar | 2-by-2 array: approximate covariance matrix. |
gamlike evaluates the negative log-likelihood of the gamma distribution.
x = [0.5 1 2 3 5 8];
phat = gamfit(x);
nlogL = gamlike(phat, x);
| Version | Description |
|---|---|
| 2.0.0 | initial version |