Prediction code for full likelihood