Added residual caculation for constant/variable scale ODP bootstrap.