Calculate residuals for workers