Code to evaluate R model performance.