gamlike
Gamma negative loglikelihood
Syntax
Description
[
also returns the inverse of the Fisher information matrix nlogL,aVar] = gamlike(___)aVar, using
any of the input argument combinations in the previous syntaxes. If the values in
params are the maximum likelihood estimates (MLEs) of the
parameters, the diagonal elements of aVar are the asymptotic
variances of their respective parameters. aVar is based on the
observed Fisher information, not the expected information.
gamlike is a utility function for maximum likelihood estimation
of the gamma distribution. Because gamlike returns the negative gamma
loglikelihood function, minimizing gamlike using fminsearch is the same as maximizing the likelihood.
Examples
Input Arguments
Output Arguments
Alternative Functionality
gamlike is a function specific to the gamma distribution.
Statistics and Machine Learning Toolbox™ also offers the generic functions mlecov, fitdist, negloglik, and proflik and the Distribution
Fitter app, which support various probability distributions.
mlecovreturns the asymptotic covariance matrix of the MLEs of the parameters for a distribution specified by a custom probability density function. For example,mlecov(params,x,"pdf",@gampdf)returns the asymptotic covariance matrix of the MLEs for the gamma distribution.Create a
GammaDistributionprobability distribution object by fitting the distribution to data using thefitdistfunction or the Distribution Fitter app. The object propertyParameterCovariancestores the covariance matrix of the parameter estimates. To obtain the negative loglikelihood of the parameter estimates and the profile of the likelihood function, pass the object tonegloglikandproflik, respectively.
Extended Capabilities
Version History
Introduced before R2006a