'Calculate the loglikelihood associated with the statespace model.
Parameters
**kwargs
Additional keyword arguments to pass to the Kalman filter. See
`KalmanFilter.filter` for more details.
Returns
loglike : float
The joint loglikelihood.'

def loglike(self, **kwargs):

    if self.memory_no_likelihood:
        raise RuntimeError('Cannot    compute    loglikelihood    if    MEMORY_NO_LIKELIHOOD    option    is    selected.')
    kwargs['conserve_memory'] = (MEMORY_CONSERVE ^ MEMORY_NO_LIKELIHOOD)
    kfilter = self._filter(**kwargs)
    loglikelihood_burn = kwargs.get('loglikelihood_burn', self.loglikelihood_burn)
    return np.sum(kfilter.loglikelihood[loglikelihood_burn:])
