Nonlinear Regression: Best Software to Calculate a & b

Click For Summary
The discussion centers on finding suitable software for nonlinear regression analysis, specifically for the equation f(x)=a*b*x/(1+b*x) with known values of x and f(x). Users suggest various software options, including SAS, Gauss, and the free R project, while emphasizing the need for nonlinear solutions to compare with linear results. MATLAB's nlinfit command is also mentioned as a potential tool. The conversation touches on the distinction between linear and nonlinear solutions, noting that they yield different results unless the data is noise-free. Additionally, there is an explanation of why the solution to a nonlinear equation is defined by the intersection with the horizontal axis, linking it to the concept of finding where a function equals zero. Overall, the thread provides insights into software options and the theoretical underpinnings of nonlinear regression.
method_man
Messages
69
Reaction score
0
Hello.

Can anyone tell me what would be the best software to use for the nonlinear regression? I have an equation with two unknown parameters which I would like to find out. Equation looks something like this: f(x)=a*b*x/(1+b*x), where x and f(x) are known (several points) and I would like to calculate a and b. In other words, I need (nonlinear) fitting to these points.
I have been looking online for a MATLAB code, but I can't find it anywhere. Also excel would do the job.
 
Physics news on Phys.org
Let y = f(x). y/x = ab/(1+bx) or x/y = 1/(ab) + x/a = \beta + \alpha x which is linear in \beta and \alpha. Clearly a = 1/\alpha and b = \alpha / \beta.
 
EnumaElish said:
Let y = f(x). y/x = ab/(1+bx) or x/y = 1/(ab) + x/a = \beta + \alpha x which is linear in \beta and \alpha. Clearly a = 1/\alpha and b = \alpha / \beta.
Thanks, but I have already done that. Like I said, I need nonlinear solution.
 
Last edited:
I may have misunderstood your purpose, but what makes you think that the nonlinear solution will be any different from the linear solution? And why would you want that, unless you're testing nonlinear software by gauging how close it gets to the linear solution?

I'd suggest SAS or Gauss even though both are likely to be expensive software. Did you check http://www.r-project.org/? It's free.
 
Last edited:
EnumaElish said:
I may have misunderstood your purpose, but what makes you think that the nonlinear solution will be any different from the linear solution? And why would you want that, unless you're testing nonlinear software by gauging how close it gets to the linear solution?

I'd suggest SAS or Gauss even though both are likely to be expensive software. Did you check http://www.r-project.org/? It's free.
I need to calculate it on both ways to compare results linear vs. nonlinear results.

Thanks for the software proposition, I'll give it a try. SPSS seems to be also good.
 
method_man said:
I have been looking online for a MATLAB code, but I can't find it anywhere

What about Matlab nlinfit command?

http://www.mathworks.com/help/toolbox/stats/nlinfit.html

You will/should get different results using nonlinear analysis. The linear and nonlinear solutions are identical only if the data contain no noise (which is a degenerate case that doesn't need regression analysis at all).
 
Last edited:
I have a general question about nonlinear equations, why do we say that the solution of a nonlinear equation is where the function intersects with the horizontal axis?
Is it because the vertical axis i s= 0?
 
The concept isn't limited to non-linear equations but is often used, I suspect because it's a great segway to using Newton's method. If we have a equation y = f(x) and you want to solve it (i.e. find x) for a specific value of y, say k, then the equation can be re-written as g(x) = f(x) - k = 0 and the solution is where g(x) is zero. It's really that simple.
 
This makes sense. It cleared one of my critical doubts.
Thanks! hotvette!
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
6
Views
1K
  • · Replies 22 ·
Replies
22
Views
4K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
4
Views
2K