def _ll_nbp(y, X, beta, alph, Q):
 mu = np.exp(np.dot(X, beta))
 size = ((1 / alph) * (mu ** Q))
 prob = (size / (size + mu))
 ll = nbinom.logpmf(y, size, prob)
 return ll

def _ll_nbp ( y , X , beta , alph , Q ) : mu = np . exp ( np . dot ( X , beta ) ) size = ( ( 1 / alph ) * ( mu ** Q ) ) prob = ( size / ( size + mu ) ) ll = nbinom . logpmf ( y , size , prob ) return ll
negative binomial log-likelihood -- type p references: greene .