0
$\begingroup$

I need to fit this, but for some reason I cannot...

data = {{0.617,0.8}, {0.605,0.6}, {0.5997,0.4}, {0.5972,0.2}, {0.5985,0.1}}; soln = NonlinearModelFit[data, {y - 2478.82*wlog[kc + 1]}, {y,w,k}, {c}, MaxIterations -> 1000]

I appreciate any help...Thanks!

$\endgroup$
2
  • $\begingroup$ Undefined function wlog? wlog= w Log? Space between k and c in kc? $\endgroup$ – Sjoerd C. de Vries Oct 30 '14 at 6:23
  • 1
    $\begingroup$ You are attempting to estimate 4 parameters (y, w, k, and the error variance) with just 5 data points. You've got to be kidding! You need more data or a much, much simpler model or tell whoever has asked you to do this that it shouldn't be done. $\endgroup$ – JimB Dec 12 '16 at 3:56
2
$\begingroup$

After fixing the many typos you have (what is log? Mathematica uses Log), and adding a constraint on k else complex solution will result, here it is

data = {{0.617, 0.8}, {0.605, 0.6}, {0.5997, 0.4}, {0.5972, 0.2}, {0.5985, 0.1}};
soln = NonlinearModelFit[data, {y - 2478.82*w Log[k c + 1], k > 0},
      {y, w, k}, c, MaxIterations -> 1000]

Mathematica graphics

There is still some warning about converge and the tolerance. You can play with options to try to eliminate these.

reference: problem-with-nonlinearmodelfit-the-function-value-is-not-a-list-of-real-num

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.