Example #1
0
 def get_log_likelihood(self):
     
     s2 = numpy.power(self.s_y,2)
     #L = ( 1.0/numpy.sqrt(2*numpy.pi*s2) ) ** self.nobs * numpy.exp( -self.ssr/(s2*2.0) )
     # logging.debug(( 1.0/numpy.sqrt(2*numpy.pi*s2) ) ** self.nobs)
     # logging.debug(numpy.exp( -self.ssr/(s2*2.0) ))
     # return self.nobs*( 1.0/numpy.sqrt(2*numpy.pi*s2))-(self.ssr/(s2*2.0))
     return (-numpy.log(2*numpy.pi)*self.nobs/2)-\
         (numpy.log(s2)*self.nobs/2)-(self.ssr/(s2*2.0))
Example #2
0
    def get_BIC(self):
        """

        Bayesian Information criterion for comparing between models
        
        """
        return self.nparams*numpy.log(self.nobs)-2*self.get_log_likelihood()