1
$\begingroup$

I need to model my data ($(x,y)$ pairs) using the following exponential function:

$$f(x) = \exp((x + a)/b) - c$$

So, I need to find $a, b, c$ coefficients that are the best fit for my data. What is the algorithm that can solve this problem?

$\endgroup$
2
  • 2
    $\begingroup$ It depends on the probability model for the errors. Typically the observed value of $f(x)$ differs from the true $f(x)$; otherwise all the data points would fit the curve perfectly. You'd have a probability density $g(y)$ depending on $a$, $b$, $c$ and possible an error variance $\sigma^2$ or the like. Plug the data points into that function, and then view it as a function of $a,b,c,\sigma$. Find the values of $a,b,c,\sigma$ that maximize that function. $\endgroup$ Sep 12, 2012 at 16:23
  • $\begingroup$ Are the $x$ values spaced equidistantly in the data? This is important for generalized Prony/Pisarenko methods. $\endgroup$
    – ccorn
    Aug 19, 2016 at 8:09

2 Answers 2

1
$\begingroup$

Assume that somehow you are able to find the value of $c$, and only $a$ and $b$ have to be found. Let $y=\log(f(x)+c)$. Then $y=a\,x+b/a$, so that simple linear regression will give the value of $a$ and $b$.

But how do we find $c$? One possibility is to try different values of $c$ until you get the best fit. Another one, is to observe that $$ -c=\begin{cases}\lim_{x\to-\infty}f(x) & \text{if }a>0,\\ \lim_{x\to+\infty}f(x) & \text{if }a<0\end{cases}. $$ If the data decrease as $x$ increases, you can guess $c$ looking at your data for large values of $x$. If the data increase with $x$, look at large negative values of $x$.

If all fails, try nonlinear regression.

$\endgroup$
1
  • $\begingroup$ I think if $|a|$ is relatively larger than $c$ linear term will be dominant and the solution that you suggested will be a good one. The other way around is another thing. $\endgroup$ Sep 13, 2012 at 13:49
0
$\begingroup$

Just on a practical note, matlab's "fminsearch" has worked well for me when fitting non-linear models like the one above to data by least squares. Just write the sum of squared deviations algorithm and then enter this into fminsearch as the function to be minimized. In Stata you can use the "nl" command. McDonald has some helpful (short and sweet) papers discussing different non-linear models like yours, how they are related, and how to fit them to data. For example "Functional Forms, Estimation Techniques, and the Distribution of Income."

$\endgroup$

You must log in to answer this question.

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