residuals-method function

Compute model residuals