logliks function

Calculates the loglikelihoods logliks calculates the loglikelihoods.