predictive_error function

Generic function and default method for predictive errors