Results 1 to 6 of 6

Thread: Nonlinear regression macro for vb6

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2010
    Posts
    3

    Nonlinear regression macro for vb6

    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.

  2. #2
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431

    Re: Nonlinear regression macro for vb6

    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.
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2010
    Posts
    3

    Re: Nonlinear regression macro for vb6

    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.

  4. #4
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431

    Re: Nonlinear regression macro for vb6

    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.
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 2010
    Posts
    3

    Re: Nonlinear regression macro for vb6

    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.

  6. #6
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431

    Re: Nonlinear regression macro for vb6

    A longer search found a (free) web app 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, Octave, and R. Good luck.
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width