| Statistics Toolbox | Search  Help Desk |
| betalike | Examples See Also |
Negative beta log-likelihood function.
Syntax
logL = betalike(params,data) [logL,info] = betalike(params,data)
Description
logL = betalike(params,data) returns the negative of the beta log-likelihood function for the two beta parameters, params, given the column vector, data. The length of logL is the length of data.
[logL,info] = betalike(params,data) also returns Fisher's information matrix, info. The diagonal elements of info 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 gamma log-likelihood function, minimizing betalike using fmins is the same as maximizing the likelihood.
Example
This continues the example forbetafit where we calculated estimates of the beta parameters for some randomly generated beta distributed data.
r = betarnd(4,3,100,1);
[logl,info] = betalike([3.9010 2.6193],r)
logl =
-33.0514
info =
0.2856 0.1528
0.1528 0.1142
See Also
betafit,fmins,gamlike,mle,weiblike