Boundary bias of local constant regression (source code)

= Boundary bias of local constant regression
{title2=$\operatorname{Bias}(\widehat m(0))\asymp h$}

A local constant average reproduces constants but need not reproduce a linear <regression function> near an endpoint. For $x_i=i/n$, $K=\mathbf1_{[-1,1]}$, $m(x)=x$, and $nh\to\infty$, its deterministic estimate at zero is $(\lfloor nh\rfloor+1)/(2n)\sim h/2$. A local linear fit removes this first-order boundary <bias of an estimator>.