Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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?

share|improve this question
2  
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. –  Michael Hardy Sep 12 '12 at 16:23
add comment

2 Answers 2

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.

share|improve this answer
    
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. –  Seyhmus Güngören Sep 13 '12 at 13:49
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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