0
$\begingroup$

I was doing regression for an exponential model that follows the general formula

$$ y=Ae^{Bx} $$

And found that using linear regression for the linearized data would model larger values of y poorly with the equation

$$ ln{\left(y\right)}=ln{\left(A\right)}+Bx $$

Based on the equations

$$ B=\frac{n\left(\sum x\ln{\left(y\right)}\right)-\left(\sum x\right)\left(ln\sum{\left(y\right)}\right)}{n\sum x^2-\left(\sum x\right)^2} $$

$$ ln{\left(A\right)}=\frac{\left(\sum ln(y)\right)\left(\sum x^2\right)-\left(\sum x\right)\left(\sum xln(y)\right)}{n\left(\sum x^2\right)-\left(\sum x\right)^2}$$

This was compared to the solving for the parameters with the least squares without transforming the data with the two equations below.

$$ \sum_{i=1}^{n}{y_ie^{bx_i}}-a\sum_{i=1}^{n}e^{2bx_i}=0 $$

$$ -\sum_{i=1}^{n}{y_ix_ie^{bx_i}}+a\sum_{i=1}^{n}{x_ie^{2bx_i}}=0 $$

The parameter 'b' was approximated with the Newton Raphson Method and substituted into the equation for the parameter 'a' based on the equations below

$$ -\sum_{i=1}^{53}{y_ix_ie^{bx_i}}+\left(\frac{\sum_{i=1}^{53}{y_ie^{bx_i}}}{\sum_{i=1}^{53}e^{2bx_i}}\right)\sum_{i=1}^{53}{x_ie^{2bx_i}}=0 $$

$$ \frac{\sum_{i=1}^{n}{y_ie^{bx_i}}}{\sum_{i=1}^{n}e^{2bx_i}}\ =a $$

This was a much better fit because it was able to better model larger values of y as compared to the transformed exponential model which used linear regression.

I also found on this https://mathworld.wolfram.com/LeastSquaresFittingExponential.html it states, "This fit [linearized exponential regression] gives greater weights to small y values"

Could anyone explain why this is the case?

$\endgroup$

1 Answer 1

1
$\begingroup$

This is a typical problem with functions which vary very fast. In fact, using the logarithm is the same as minimizin the relative error instead of the absolute arror.

Consider $$\Delta_i=\log(\hat y_i)-\log( y_i)=\log\left(\frac{\hat y_i }{y_i } \right)=\log\left(\frac{\hat y_i-y_i+y_i }{y_i } \right)$$ $$\Delta_i=\log\left(1+\frac{\hat y_i-y_i }{y_i } \right)\sim \frac{\hat y_i-y_i }{y_i } $$

I remember having worked this problem for you and as you saw the parameters changed a lot.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .