Proof coefficient in log-log model is equal to coefficient of elasticity I am trying to see how we treat $\varepsilon$ in the following proof:

Suppose we have a log-log single variable regression model

$$ \ln(y) = \alpha + \beta \ln(x) + \varepsilon $$

then take partial derivative with respect to $x$ on both sides

\begin{align}&amp;\implies \frac{\partial}{\partial x} \ln(y) = \frac{\partial}{\partial x} (\alpha + \beta \ln(x) + \varepsilon)\\&amp;\implies\frac{\partial \ln(y)}{\partial y} \frac{\partial y}{\partial x} = 0 + \beta \frac{1}{x} + \frac{\partial \varepsilon}{\partial x}\\&amp;\implies\frac{1}{ y} \frac{\partial y}{\partial x} = \beta \frac{1}{x} + \frac{\partial \varepsilon}{\partial x}\end{align}

We want to show that $\beta$ is equal to the elasticity of $y$ with respect to $x$

$$ \beta = \frac{\partial y}{\partial x} \frac{x}{y} $$

But how do we know the $\dfrac{\partial \varepsilon}{\partial x} $ term is zero?
Because $\Bbb E[\varepsilon \mid x]= 0$ is one of the key assumptions for the estimation.