Postfit residual calculation