Added a function to compute the total log-likelihood.