# How to show the first order condition of LAD estimator fo median regression is of order $o_{p}(\frac{1}{\sqrt{n}})$?

Given the model $$y_{i}=x_{i}^{\prime}\beta_{0}+\epsilon_{i}$$ with $$E[sgn(\epsilon_{i})|x_{i}]=0$$ and $$E[sgn(\epsilon_{i}-c)|x_{i}] \neq 0$$ if $$c=c(x_{i}) \neq 0$$, where $$sgn(\epsilon)=1-2 \cdot 1(\epsilon<0)$$.

let $$\hat{\beta}=argmin_{\beta} \frac{1}{n}\sum_{i=1}^{n}\{|y_{i}-x_{i}^{\prime}\beta|-|y_{i}-x_{i}^{\prime}\beta_{0}|\}$$

Assume (i) $$(y_{i},x_{i})$$ for $$i=1,\cdots,n$$ are i.i.d. across $$i$$. (ii) $$E\|x_{i}\|^{2}<\infty$$. (iii) The error $$\epsilon_{i}$$ are continuously distributed given $$x_{i}$$, with conditional density $$f(\epsilon|x_{i})$$ satisfying $$\int_{-\infty}^{0}f(\lambda|x_{i})d\lambda=\frac{1}{2}$$. (iv)$$E[f(0|x_{i})x_{i}x_{i}^{\prime}]$$ is positive definite.

Differentiating the criterion function wrt $$\beta$$ yields the subgradient: $$\frac{1}{n} \sum_{i=1}^{n} sgn(y_{i}-x_{i}^{\prime}\hat{\beta})x_{i}.$$

The aim is to show $$\frac{1}{n}\sum_{i=1}^{n}sgn(y_{i}-x_{i}^{\prime}\hat{\beta})x_{i}=o_{p}(\frac{1}{\sqrt{n}})$$.

James L. Powell shows in his notes "Notes On Median and Quantile Regression" at page 6 that $$\left\vert \frac{1}{n}\sum_{i=1}^{n}sgn(y_{i}-x_{i}^{\prime}\hat{\beta})x_{i}\right\vert \leq \left\vert \frac{1}{n}\sum_{i=1}^{n}1(y_{i}=x_{i}^{\prime}\hat{\beta})x_{i}\right\vert \leq \left[\sum_{i=1}^{n}1(y_{i}=x_{i}^{\prime}\hat{\beta})\right]\max_{i} \frac{\|x_{i}\|}{n} = K \cdot o_{p}(\frac{1}{\sqrt{n}})$$ where $$K=dim{\beta}$$.

I spent a few days on this issue, and still had difficulty in understanding the first inequality and the (last) equality. Could anyone can help me on this? Thank you very much for your help and kindness in advance! Powell's note can be found in the following website https://eml.berkeley.edu/~powell/e241a_sp06/qrnotes.pdf