Loglikelihood function for Binomial exponential family distribution.
Parameters: | endog : array-like
mu : array-like
scale : float, optional
|
---|---|
Returns: | llf : float
|
Notes
If endog is binary: llf = scale*sum(endog*log(mu/(1-mu))+log(1-mu))
If endog is binomial: llf = scale*sum(gammaln(n+1) - gammaln(y+1) - gammaln(n-y+1) + y*log(mu/(1-mu)) + n*log(1-mu)
where gammaln is the log gamma function and y = endog*n with endog and n as defined in Binomial initialize. This simply makes y the original number of successes.