Nonlinear Regression: Best Software to Calculate a & b

Click For Summary

Discussion Overview

The discussion revolves around the best software options for performing nonlinear regression analysis, specifically for an equation involving two unknown parameters. Participants explore various software tools and methods for fitting data points to a nonlinear model.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant inquires about the best software for nonlinear regression, mentioning a specific equation and the need for fitting known data points.
  • Another participant suggests a transformation of the equation to a linear form, proposing that a linear solution could suffice.
  • A different participant challenges the assumption that the nonlinear solution would differ from the linear solution, questioning the necessity of nonlinear fitting.
  • Suggestions for software include SAS, Gauss, and R, with a note that R is free, while MATLAB's nlinfit command is also mentioned as a potential tool.
  • One participant emphasizes that nonlinear analysis is expected to yield different results compared to linear analysis, particularly in the presence of noise in the data.
  • A general question about the nature of solutions to nonlinear equations is raised, leading to a clarification about finding intersections with the horizontal axis.
  • Another participant provides a brief explanation of the concept of solving equations by finding where a function equals zero, relating it to Newton's method.

Areas of Agreement / Disagreement

Participants express differing views on the necessity and implications of nonlinear versus linear regression solutions. There is no consensus on whether the nonlinear solution is fundamentally different from the linear solution, and the discussion remains unresolved regarding the best approach to take.

Contextual Notes

Some participants rely on specific software capabilities and the nature of the data, which may influence their recommendations. The discussion includes assumptions about the presence of noise in data and the conditions under which linear and nonlinear solutions may yield different results.

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
3K
Replies
3
Views
3K
Replies
6
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 22 ·
Replies
22
Views
4K
  • · Replies 6 ·
Replies
6
Views
3K
Replies
9
Views
2K
Replies
4
Views
3K