I am using NonlinearModelFit to extract the gradient of what appears to be linear data in a logplot:
data = {{-0.010133333333333334`,
124.50000000000001`}, {-0.006933333333333333`,
610.`}, {-0.005600000000000001`,
75.58333333333333`}, {-0.004266666666666669`,
33.183673469387756`}, {-0.0029333333333333295`,
17.23926380368098`}, {-0.0015999999999999973`,
5.47681331747919`}, {-0.00026666666666666505`,
1.3872715510270095`}, {0.0010666666666666672`,
0.3445990722332671`}, {0.0023999999999999994`,
0.0713022981732469`}, {0.0037333333333333316`,
0.05300353356890459`}, {0.005066666666666671`,
0.021496815286624203`}, {0.006400000000000003`,
0.0028530670470756064`}, {0.008266666666666665`,
0.004938271604938271`}};
expmodel =
NonlinearModelFit[data, a*Exp[b*x], {a, b}, x, MaxIterations -> 200];
Show[{
ListLogPlot[data],
LogPlot[expmodel[x], {x, -0.01, 0.005}]}]
The function returned by NonlinearModelFit, however, does not match the data at all. I even tried to give realistic initial values to parameters a
and b
, but that didn't help.