Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'nonlinear regression argument' topicStudent Support Forum > General > Archives > "nonlinear regression argument"

Next Comment >Help | Reply To Topic
Author Comment/Response
Fig Newton
10/20/11 1:08pm

I have a plot of Q vs. P I'd like to fit to a model using nonlinear regression. Getting the error:
NonlinearModelFit::argrx: NonlinearModelFit called with 5 arguments; 4 arguments are expected. >>

Not sure what's happening. There are five terms in the equation: KaFit, QmFit, L, and then P and Q (x and y, respectively). But I define L, so what does it still thing there are 5 arguments?


code:

L = 1*10^-8
fluorescenceQuadraticFit =
Solve[2*P == (KaFit^-1*Q)/(QmFit - Q) + (L*Q)/(QmFit), Q]
fluorescenceQuadraticFitFlat = Flatten[fluorescenceQuadraticFit];
temp1Fit = Extract[fluorescenceQuadraticFitFlat, 1]; tempEq1Fit =
Extract[temp1Fit, 2];
temp2Fit = Extract[fluorescenceQuadraticFitFlat, 2]; tempEq2Fit =
Extract[temp2Fit, 2];
fluorescenceQuadraticFitEq[P_] = tempEq1Fit

dataSetCheck[
4] = {{0, 0.`}, {0.004009715464`,
0.0021611001964636544`}, {0.006014573196`, \
-0.039096267190569745`}, {0.009021859795`, -0.05245579567779961`}, \
{0.01353278969`, -0.03575638506876228`}, {0.02029918454`, \
-0.05893909626719057`}, {0.030448776809999998`, \
-0.04754420432220039`}, {0.04567316521`, -0.10137524557956779`}, \
{0.06850974782000001`, -0.06326129666011787`}, {0.1027646217`, \
-0.0962671905697446`}, {0.1541469326`, -0.09115913555992142`}, \
{0.23122039889999998`, -0.10726915520628684`}, {0.3468305983`, \
-0.06640471512770138`}, {0.5202458974999999`,
0.07426326129666012`}, {0.7803688462`,
0.14950884086444008`}, {1.170553269`,
0.32102161100196464`}, {1.755829904`,
0.46994106090373283`}, {2.633744856`,
0.5497053045186641`}, {3.9506172840000002`,
0.5461689587426326`}, {5.925925926`,
0.618467583497053`}, {8.888888889`,
0.6390962671905698`}, {13.33333333`, 0.6612966601178782`}, {20,
0.7777996070726916`}}

notworking =
NonlinearModelFit[dataSetCheck[4],
fluorescenceQuadraticFitEq[P], {KaFit, 1*10^6}, {QmFit, 0.5}, P]

URL: ,

Subject (listing for 'nonlinear regression argument')
Author Date Posted
nonlinear regression argument Fig Newton 10/20/11 1:08pm
Re: nonlinear regression argument Quinn McKinsey 11/26/11 11:56pm
Next Comment >Help | Reply To Topic