binolike
Negative log-likelihood for the binomial distribution.
nlogL = binolike (params, x)
returns the negative
log likelihood of the binomial distribution with (1) parameter n and
(2) parameter ps, given in the two-element vector params, where
n is the number of trials and ps is the probability of success,
given the number of successes in x. Unlike binofit
, which
handles each element in x independently, binolike
returns the
negative log likelihood of the entire vector x.
[nlogL, acov] = binolike (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 params are their asymptotic variances.
[…] = binolike (params, x, 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))
.
Further information about the binomial distribution can be found at https://en.wikipedia.org/wiki/Binomial_distribution
See also: binocdf, binoinv, binopdf, binornd, binofit, binostat
Source Code: binolike