The question comes from the paper ``Regression Quantiles'' by Roger Koenker and Gilbert Bassett(1978).
$0< \theta <1$. Define $\psi(b;\theta,y,X)=\sum^{T}_{t=1}[\theta-1/2+1/2 \; \text{sgn}(y_{t}-x_{t}b)][y_{t}-x_{t}b]$, where sgn(u) takes values $1,0,-1$ as $u \gtreqless 0$.
Here, $y_{t}$ is a scalar and $x_{t}$ is a $K \times 1$ vector.
Then \textbf{my question} is: what is the directional derivative of $\psi(b)$ in the direction $w$?
The paper states that the answer is \begin{equation} \psi^{\prime}(b;w)=\sum^{T}_{t=1}[1/2-1/2 \; \text{sgn}^{\ast}(y_{t}-x_{t}b;-x_{t}w)-\theta]x_{t}w, \end{equation} where $\text{sgn}^{\ast}(u;z)= \begin{cases} \text{sgn} \; u \; \text{if} \; u \neq 0,\\ \text{sgn} \; z \; \text{if} \; u = 0 \end{cases}$
But I do not know how to derive this result.