Iterative Curve Fitting in IGOR
puglie12
Fri, 10/31/2014 - 03:28 am
Hello, I am trying to write a procedure for minimizing the sum of differences for 2 data sets (experimental and model): min||Σi λi * x(t)i – y(t)||. I understand to fit a model (x) to a dataset (y) we can use IGOR's built-in curve fitting function. I have read the manual on this section but don't understand how to go about executing an iterative curve fit (I have never done this type of analysis before). Any help or direction to examples would be appreciated.
Thank you,
Stephanie
October 31, 2014 at 05:11 am - Permalink
So in the Curve Fitting dialogue box, I create a New Fit Function (which in my case is something like f(x)=lambda*x-y) and give an initial guess as to what lambda is?
October 31, 2014 at 05:35 am - Permalink
On the command line create a global variable and set its value with this command:
Variable V_FitOptions=2
Now click the FuncFit command and press Enter to copy the command to the command line. Press Enter again the execute the command. Now the fit will use least absolute error instead of least squared error. From the documentation on this technique:
On your other post, I recommended Optimize for your problem. This technique with FuncFit may be easier for you. Neither method will get you proper errors on the result. For that, you probably need to use some technique like Bootstrap, which will be quite difficult.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
October 31, 2014 at 10:35 am - Permalink