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?
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?
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.
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."