#NEWLINE# def _ll_nb2( y , X , beta , alph ) : #NEWLINE# #INDENT# mu = np . exp ( np . dot ( X , X ) ) #NEWLINE# size = ( 1 / alph ) #NEWLINE# prob = ( size / ( size + mu ) ) #NEWLINE# ll = nbinom . logpmf ( y , size , prob ) #NEWLINE# return ll