Global fit does not compute on all my data range
LeChat
Hi,
I am trying to make a global fit over two different datasets :
•print WE
WE[0]= {120.61,144.92,191.86,209.37,216.11}
•print ME
ME[0]= {47.49,76.78,127.72,151.19,205.11}
versus:
•print Conc
Conc[0]= {100,250,500,750,1000}
with the following function:
return w[0]-w[1]*exp(-(x-w[2])/w[3])
Here is the output of the Global fit (A=w[1] linked) that I got in the Command window:
*** Doing Global fit ***
Fit converged properly
Duplicate/O YCumData,WMCF_TempXWave
WMCF_TempXWave = x
NewGlblFitFunc(MasterCoefs,FitY,WMCF_TempXWave)
FitY=FitY[p]
NewGF_ResidY = YCumData[p] - FitY[p]
KillWaves/Z WMCF_TempXWave
MasterCoefs={254.96,125.53,145.22,603.79,993.14,11047,5446.1}
V_chisq= 76.3488;V_npnts= 9;V_numNaNs= 0;V_numINFs= 0;
V_startRow= 0;V_endRow= 8;
W_sigma={12.1,5.36e+05,2.58e+06,90.8,1.94e+03,2.33e+07,1.24e+04}
Coefficient values ± one standard deviation
K0 =254.96 ± 12.1
K1 =125.53 ± 5.36e+05
K2 =145.22 ± 2.58e+06
K3 =603.79 ± 90.8
K4 =993.14 ± 1.94e+03
K5 =11047 ± 2.33e+07
K6 =5446.1 ± 1.24e+04
Global Fit converged normally.
Global fit results
Fit converged normally
V_chisq = 76.3488 V_npnts= 9 V_numNaNs= 0 V_numINFs= 0
Number of iterations: 2
Data Set: root:WE vs root:Conc ; Function: ExpManual
0 yinf[ExpManual][root:WE] 254.956 +- 12.059
1 A[ExpManual][root:WE] 125.526 +- 535545
2 xo[ExpManual][root:WE] 145.219 +- 2.57603e+06
3 tau[ExpManual][root:WE] 603.794 +- 90.8227
Data Set: root:ME vs root:Conc ; Function: ExpManual
0 yinf[ExpManual][root:ME] 993.142 +- 1941.43
1 A[ExpManual][root:WE] 125.526 +- 535545 ** LINKED to data set root:WE coefficient 1: A[ExpManual][root:WE]
2 xo[ExpManual][root:ME] 11047.1 +- 2.32671e+07
3 tau[ExpManual][root:ME] 5446.13 +- 12358.8
Each dataset is 5 elements long (so 10 total), but somehow the Global fit only computes over 9 elements. Would you see any explanation of why this would happen?
Thank you!
It's possible that you posted enough information to suggest something, but I'm not sure about that. Could you post your Igor experiment file? If you can do that, then I might be able to take a look at exactly what you did and figure out what's going on.
May 28, 2020 at 10:30 am - Permalink
Dear John,
Please find attached a (hopefully not too) cleaned-up version of my .pxp file. Thank you for your help.
Stay well
June 2, 2020 at 12:32 pm - Permalink
As you sent the experiment file, the weighting panel has two non-existent waves selected as weighting waves: WTEarea_err and MTEarea_err. There are four waves with the suffix "_err"; two of those have "perim" as part of the name, so I expect those are the ones you are using. They each have a NaN (not-a-number, in an Igor table, a blank cell) at the end. If you are using those weighting waves, the NaNs will mask away the last of the five points from each wave when you do the fit.
June 3, 2020 at 12:07 pm - Permalink
Oh that totally makes sense. Thank you!
June 3, 2020 at 01:49 pm - Permalink
No problem!
June 3, 2020 at 05:02 pm - Permalink