Added functions to calculate posterior model probabilities