Statistics: gamlike

### Function Reference: `gamlike`

statistics: nlogL = gamlike (params, x)
statistics: [nlogL, acov] = gamlike (params, x)
statistics: […] = gamlike (params, x, censor)
statistics: […] = gamlike (params, x, censor, freq)

Negative log-likelihood for the Gamma distribution.

`nlogL = gamlike (params, x)` returns the negative log likelihood of the data in x corresponding to the Gamma distribution with (1) shape parameter k and (2) scale parameter theta given in the two-element vector params.

`[nlogL, acov] = gamlike (params, x)` also returns the inverse of Fisher’s information matrix, acov. If the input parameter values in params are the maximum likelihood estimates, the diagonal elements of acov are their asymptotic variances.

`[…] = gamlike (params, x, censor)` accepts a boolean vector, censor, of the same size as x with `1`s for observations that are right-censored and `0`s for observations that are observed exactly. By default, or if left empty, `censor = zeros (size (x))`.

`[…] = gamlike (params, x, censor, freq)` accepts a frequency vector, freq, of the same size as x. freq typically contains integer frequencies for the corresponding elements in x, but it can contain any non-integer non-negative values. By default, or if left empty, `freq = ones (size (x))`.

There are two equivalent parameterizations in common use:

1. With a shape parameter k and a scale parameter θ, which is used by `gamcdf`.
2. With a shape parameter α = k and an inverse scale parameter β = 1 / θ, called a rate parameter.

Further information about the Gamma distribution can be found at https://en.wikipedia.org/wiki/Gamma_distribution

See also: gamcdf, gampdf, gaminv, gamrnd, gamfit

Source Code: gamlike