4
$\begingroup$

I'm trying to fit values from this model $$y(x)=ae^{−bx}+c$$

where a, b and c are 3 different parameters that I want to find with least squares. So using least squares I want to find the value of a, b and c using this formula

$$ \mathrm{argmin}\sum_i \left( ae^{−bx_i}+c - y_i \right)^2. $$

This leads me to 3 non linear equations after partial derivation of the previous one with respect a, b and c. Surely there are already the general formula for this case but I cannot find them. Can anybody help me?

$\endgroup$
3
  • $\begingroup$ As far as I know what you have is the general formula. For non-linear regressions, closed formed solutions often do not exist, so they are solved numerically using the minimization function and a gradient function if available (which it sounds like you already have). Obviously if you put the $c$ coefficient in the exponents or removed it you could log both sides and do OLS on that. $\endgroup$ – Zachary Blumenfeld May 11 '15 at 0:45
  • $\begingroup$ Domenico, exactly as in my answer to your earlier question there is no closed form formula for the solutions of these equations, Again they have to be obtained by iterative calculations. $\endgroup$ – Glen_b May 11 '15 at 0:53
  • $\begingroup$ Since this question presents the issue more clearly than your other question, you might consider editing the manner of presenting the information here into your other question. It would improve it quite a lot. $\endgroup$ – Glen_b May 11 '15 at 1:00
3
$\begingroup$

In this 3 parameter form ($E(y)=ae^{−bx}+c$), your question has a nice simple structure that can be exploited.

In particular, if you condition on $b$, and let $z_i=e^{-bx_i}$, you have

$E(y|b)=az+c$ and need to find the solution to:

$\text{argmin}_{a,c}\sum_i \left( az_i+c - y_i \right)^2\,,$

which is just an ordinary linear regression problem.

With a little additional effort (i.e. substitution of the solution for $\hat{a}$ and $\hat{c}$ as a function of $y$, $x$ and $b$ into the original LS problem), this reduces the problem to a univariate optimization problem (in $b$), which might make life somewhat easier; it could be tackled by routine optimization, for example.

That said, I'd still probably just call a nonlinear least squares function for this problem.

(The same trick could be used on your two parameter version in the other question, but I think any gain there is even smaller and I'd be even less inclined to do it.)

$\endgroup$
2
  • $\begingroup$ Since this is already a second question on this problem I am afraid that the "little additional effort" line could need a broader description... $\endgroup$ – Tim May 11 '15 at 8:30
  • 1
    $\begingroup$ @Tim yes, perhaps not immediately obvious, I added some specific information $\endgroup$ – Glen_b May 11 '15 at 9:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.