new function to estimateResidual variance. not documented
regr.km: add jitter option