predict_diagnostics function

If the residual_function argument of the explain() function is applied with the default NULL value, then model residuals are calculated.