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