PDA

Click to See Complete Forum and Search --> : Nonlinear regression macro for vb6


Beligol
Aug 23rd, 2010, 09:24 PM
I am trying to find a macro that will solve the following equation:

y = 1.5*A*(x^(7/3)-x^(5/3))*(1+0.75*(B-4)*(x^(2/3)-1))

y and x will be determined from experimental data. A and B are the values to be solved for. I know that the equation can be made simpler if the value for x is replaced with x^(1/3). Any help that could be provided would be greatly appreciated.

jemidiah
Aug 23rd, 2010, 11:06 PM
Are you just doing a standard curve fit?

That is, will you have many (x,y) pairs of known values, and you want to figure out what values of A and B work best at making the above equality close to true for all of your pairs?

If so, it would probably be faster and easier to use existing software rather than writing your own. Your problem seems very specific and like a one-time-thing.

Beligol
Aug 23rd, 2010, 11:30 PM
I will be using x,y pairs to try to determine an optimum curve that represents the data but the problem isn't a one time thing. If I had the money I would invest in a program to handle it. Until that time I need something to act in the interim.

jemidiah
Aug 24th, 2010, 07:01 AM
An incredibly brief Google search for "curve fitting freeware" yielded some cheap/free results that would be much more fully-featured than writing your own routines. (Curve fitting optimization usually requires some linear algebra which most people find to be a pain.) If you're really, really interested in writing your own I could give a more complete answer. I just don't think it's worth anybody's time.

Beligol
Aug 24th, 2010, 03:10 PM
I have tried most of the programs in that incredibly brief google search and most of them are not "free" but are instead trial versions that are not fully implemented or they will not do nonlinear regressions. So I suppose I will just figure it out myself.

jemidiah
Aug 24th, 2010, 04:35 PM
A longer search found a (free) web app (http://zunzun.com/) that seems to do what you want. I tested it out on a simple linear model, and the fit equation is user editable. Other well-known freeware packages that should have the same functionality are... Gnuplot (http://www.duke.edu/~hpgavin/gnuplot.html), Octave (http://www.osalt.com/octave), and R (http://www.r-project.org/). Good luck.