'Calculate the loglikelihood for each observation associated with the
statespace model.
Parameters
**kwargs
Additional keyword arguments to pass to the Kalman filter. See
`KalmanFilter.filter` for more details.
Notes
If `loglikelihood_burn` is positive, then the entries in the returned
loglikelihood vector are set to be zero for those initial time periods.
Returns
loglike : array of float
Array of loglikelihood values for each observation.'

def loglikeobs(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)
    llf_obs = np.array(kfilter.loglikelihood, copy=True)
    loglikelihood_burn = kwargs.get('loglikelihood_burn', self.loglikelihood_burn)
    llf_obs[:loglikelihood_burn] = 0
    return llf_obs
