View Full Version : nonlinear regression
method_man
Jan4-11, 08:22 AM
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.
EnumaElish
Jan4-11, 08:39 AM
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.
method_man
Jan4-11, 11:00 AM
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.
EnumaElish
Jan4-11, 12:27 PM
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.
method_man
Jan4-11, 11:00 PM
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.
hotvette
Jan5-11, 11:06 PM
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).
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?
hotvette
Mar1-11, 08:00 PM
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!
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.