| Statistics Toolbox | ![]() |
Negative beta log-likelihood function
Syntax
Description
returns the negative of the beta log-likelihood function for the beta parameters a and b specified in vector params and the observations specified in column vector logL = betalike(params,data)
data. The length of logL is the length of data.
also returns [logL,avar] = betalike(params,data)
avar, which is the asymptotic variance-covariance matrix of the parameter estimates if 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.
betalike is a utility function for maximum likelihood estimation of the beta distribution. The likelihood assumes that all the elements in the data sample are mutually independent. Since betalike returns the negative beta log-likelihood function, minimizing betalike using fminsearch is the same as maximizing the likelihood.
Example
This example continues the betafit example where we calculated estimates of the beta parameters for some randomly generated beta distributed data.
r = betarnd(4,3,100,1); [logl,avar] = betalike([3.9010 2.6193],r) logl = -33.0514 avar = 0.2856 0.1528 0.1528 0.1142
See Also
betafit, fminsearch, gamlike, mle, normlike, weiblike
| betainv | betapdf | ![]() |