+ Reply to Thread
Results 1 to 10 of 10

Regress nonlinear equation

  1. #1
    Registered User
    Join Date
    11-08-2008
    Location
    Stoughton, MA
    Posts
    19

    Regress nonlinear equation

    Below is a nonlinear model, together with calibration data for which I would like to find the parameters Ro, Kc, a and b.

    R = Ro + Kc * (1/(1 + exp(-(a + b*lnC))

    Calibration Data

    C R
    0.0 0.3347
    4.8 0.4201
    7.7 0.5141
    11.2 0.6177
    14.4 0.6887

    Given the calibration data above, how can I calculate or at least estimate these parameters?
    I do not want to use an add-in program, like Solver, in Excel. I do, however, want to be able to use any existing functions, if necessary, in Excel. i'd appreciate it if someone can walk me through the steps.

    Thanks,

    Sheldon
    Last edited by VBA Noob; 11-20-2008 at 01:34 PM.

  2. #2
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    re: Fitting data to a 4 paramter nonlinear equation

    what is Ln(0) How can C=0 (zero) give a result? it is -INF
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    And why the prejudice against Solver?
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    11-08-2008
    Location
    Stoughton, MA
    Posts
    19

    Red face

    Quote Originally Posted by rwgrietveld View Post
    what is Ln(0) How can C=0 (zero) give a result? it is -INF

    Yes, I realize that the ln(0) is indeterminate. Perhaps one can use a very small number instead, like 0.00001 as an example.

  5. #5
    Registered User
    Join Date
    11-08-2008
    Location
    Stoughton, MA
    Posts
    19

    Red face

    Quote Originally Posted by shg View Post
    And why the prejudice against Solver?
    I'm trying to match ther output from an analytical instrument that is "ancient", actually at least 20 years old. Obviously, it doesn't use Solver. There's got to be an old-fashioned step-by-step way to determine these parameters. Basically I'm trying to find out what algorithm is being used in the instrument.

    I'm familiar with Newton-Raphson, but only for one variable, not 4 or 5. Certainly there must be a way in Excel to do these calculations the "hard" way.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    It regresses well using a small value for C in lieu of zero. And of course it's possible to do (eventually) via VBA or even worksheet functions what Solver does.

    Two things: First, it might be hard to charm someone into reinventing Solver. Second, your answer makes it sound like you would further wish to iterate over several methods of solution to identify some 'best fit' to instrument results. Tall order, methinks.

    Why not try Solver first?

    Out of curiosity, what instrument?

  7. #7
    Registered User
    Join Date
    11-08-2008
    Location
    Stoughton, MA
    Posts
    19

    Red face

    Quote Originally Posted by shg View Post
    It regresses well using a small value for C in lieu of zero. And of course it's possible to do (eventually) via VBA or even worksheet functions what Solver does.

    Two things: First, it might be hard to charm someone into reinventing Solver. Second, your answer makes it sound like you would further wish to iterate over several methods of solution to identify some 'best fit' to instrument results. Tall order, methinks.

    Why not try Solver first?

    Out of curiosity, what instrument?
    CBAS MIRA This is a clinical chemistry random access analyzer. It measures components in a person's blood serum or plasma

    I don't know what you got for results but the instrument output is the following:
    Ro = 486.352
    Kc = 839.297
    a = -4.87399
    b = 1.99643

    I'll bet you didn't get these numbers.

    I can't use Solver. There's got to be a way. This instrument doesn't have Solver.

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Not, I get nothing like that -- but those numbers don't remotely fit the model, either (see attached).

    As a general comment, I think a regression should have at least three times as many data points as coefficients; this has five data points and four coefficients.
    Attached Files Attached Files
    Last edited by shg; 11-20-2008 at 04:18 PM.

  9. #9
    Registered User
    Join Date
    11-08-2008
    Location
    Stoughton, MA
    Posts
    19

    Red face

    Quote Originally Posted by shg View Post
    Not, I get nothing like that -- but those numbers don't remotely fit the model, either (see attached).

    As a general comment, I think a regression should have at least three times as many data points as coefficients; this has four data points and four coefficients.
    Actually the data does fit the parameters (see attached) If you solve for C using the calculated R values, along with the 4 parameters Ro, Kc, a and b it will return the values for each standard.

    Regardless, Istill need to find out the algorithm that detrmines th parms that the instrument spits out.

    Thanks
    Attached Files Attached Files

  10. #10
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    That's a completely different set of R values from your first post. I guess I'm missing something that you apparently understand.

    Sorry I couldn't help, good luck.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1