Solved – Finding a linear regression model that minimized percentage error in R

rregression

What is the way to find a linear regression model in R which minimizes the mean square error of residuals expressed in percents rather than the absolute difference?

Best Answer

Easy. There are actually several choices, first is to take the logarithm of the y-axis values, that converts multiplication into addition thus it converts relative error into absolute error.

Second choice, that you didn't ask for, would be to do the regression minimizing a different norm. That is, usually one minimizes $||model-y_{data}||$, where $||.||$ is the norm, A.K.A. the L2 norm, A.K.A. the absolute value of a vector difference, A.K.A. the square root of the sum of squares of the difference. To do this for proportional modeling one minimizes $||\frac{model}{y_{data}}-1||$.

Related Question