#NEWLINE# def loglike( self , params ) : #NEWLINE# #INDENT# '\n        Loglikelihood for arma model\n\n        Notes\n        -----\n        The ancillary parameter is assumed to be the last element of\n        the params vector\n        ' #NEWLINE# errorsest = self . geterrors ( params ) #NEWLINE# sigma2 = np . maximum ( ( self [ ( - 1 ) ] ** 2 ) , 1e-06 ) #NEWLINE# axis = 0 #NEWLINE# nobs = len ( errorsest ) #NEWLINE# llike = ( ( - 0.5 ) * ( ( ( nobs * np . log ( sigma2 ) ) + np . sum ( ( ( errorsest ** 2 ) / sigma2 ) , axis ) ) + ( nobs * np . log ( ( 2 * np . pi ) ) ) ) ) #NEWLINE# return llike