Statistics Toolbox    
gamlike

Negative gamma log-likelihood function

Syntax

Description

logL = gamlike(params,data) returns the negative of the gamma log-likelihood function for the parameters, params, given data. The length of output vector logL is the length of vector data.

[logL,avar] = gamlike(params,data) also returns avar, which is the asymptotic variance-covariance matrix of the parameter estimates when the values in params are the maximum likelihood estimates. avar is the inverse of Fisher's information matrix. The diagonal elements of avar are the asymptotic variances of their respective parameters.

gamlike is a utility function for maximum likelihood estimation of the gamma distribution. Since gamlike returns the negative gamma log-likelihood function, minimizing gamlike using fminsearch is the same as maximizing the likelihood.

Example

This example continues the example for gamfit.

See Also

betalike, gamcdf, gamfit, gaminv, gampdf, gamrnd, gamstat, mle, normlike, weiblike


  gaminv gampdf