Timeline for Having trouble fitting data using NonlinearModelFit
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 2, 2017 at 2:45 | comment | added | Daniel van Flymen | Appreciate the answer, thank you! | |
Feb 2, 2017 at 2:44 | vote | accept | Daniel van Flymen | ||
Nov 26, 2013 at 15:46 | history | edited | bobthechemist | CC BY-SA 3.0 |
Revised discussion of modeling and incorporated comments.
|
Nov 26, 2013 at 2:45 | comment | added | Ray Koopman |
@bob is right. It's instructive here to look at the actual values of the parameter estimates. If we make the simple transformations xnew = x-2000, ynew = y/1000 we get f[xnew] = 260.48 - 283.569 E^(-0.134679 x) . Transforming back gives 1000 f[x - 2000] = 260480. - 2.7145*10^122 E^(-0.134679 x) .
|
|
Nov 25, 2013 at 21:59 | comment | added | Szabolcs | @bobthechemist It'll probably be easier to transform the equation instead of the data, then we can spare that back-transformation. | |
Nov 25, 2013 at 21:37 | comment | added | Dr. belisarius |
You've transformed x by a linear transformation, so now your exponential is something like Exp[b (pp xnew + qq)] where pp and qq comes from the Rescale parameters
|
|
Nov 25, 2013 at 21:28 | comment | added | bobthechemist | @belisarius what's not obvious to me is how one converts the parameters back to the OP's original units. a and c should be accessible via some basic algebra; however I don't know the relationship between normalized and non-normalized b. | |
Nov 25, 2013 at 21:15 | comment | added | Dr. belisarius |
scx = {Min[data[[All, 1]]], Max[data[[All, 1]]]}; scy = {Min[data[[All, 2]]], Max[data[[All, 2]]]}; Plot[ Rescale[nlm[Rescale[x, scx, {0, 1}]], {0, 1}, scy], {x, Rescale[0, {0, 1}, scx], Rescale[1, {0, 1}, scx]}, Epilog -> {Red, PointSize[0.02], Point /@ data}, PlotRange -> All]
|
|
Nov 25, 2013 at 21:07 | history | edited | Dr. belisarius | CC BY-SA 3.0 |
deleted 35 characters in body
|
Nov 25, 2013 at 21:02 | history | answered | bobthechemist | CC BY-SA 3.0 |