Hi folks,
I was playing around with datcmp and think I may have found a bug. I took a CRYSOL fit, pulled out the data and fit, and ran datcmp with the chi^2 test:
(base) jessehopkins@medusa chi_sq % datcmp test=CHISQUARE 2POL_polymerase_FIT.dat 2POL_polymerase.dat
Hypothesis: all data sets are similar
Alternative: at least one data set is different
Pairwise Reduced Chi^2 test with correction for Familywise Error Rate (Bonferroni)
Chi^2 Pr(>Chi^2)adj Pr(>Chi^2
1 vs. 2 0.760088 0.999907 0.999907
1* 2POL_polymerase_FIT.dat
2* 2POL_polymerase.dat
The CRYSOL .fit file has the chi^2 as 1.52, and I wrote a quick little python calculator for reduced chi^2 and got 1.52 as well. So there seems to be a factor of 2 off somewhere in the chi^2 calculator?
Data are attached.
Jesse
datcmp bug?
datcmp bug?
 Attachments

 2POL_polymerase.fit
 (23.73 KiB) Downloaded 22 times

 2POL_polymerase.dat
 (18.85 KiB) Downloaded 19 times

 2POL_polymerase_FIT.dat
 (18.73 KiB) Downloaded 21 times
Re: datcmp bug?
I think I figured out what's going on. The extracted fit data had the experimental uncertainties associated with it (to make a 3 column dataset, for lack of anything else to use). If instead of the experimental uncertainties being used to calculate chi^2 I use uncertainties that are created by summing the uncertainties for two datasets in quadrature I get the result that datcmp is outputting.
So it seems like for two datasets with specified uncertainties datcmp does a quadrature sum and uses that as the uncertainty for chi^2. Is there a statistical reason for that? I've never encountered that before.
So it seems like for two datasets with specified uncertainties datcmp does a quadrature sum and uses that as the uncertainty for chi^2. Is there a statistical reason for that? I've never encountered that before.