how to calculate residuals - Search