Author |
Topic |
|
thaase1
Canada
1 Posts |
Posted - 04/19/2014 : 3:00:29 PM
|
Origin Ver. 9.1.0 PRO Operating System:Windows 7
Hi there, I am trying to find a way to test whether two fits from concatenated data sets can be compared. In the new pro version you can use the compare data sets function under /fitting...however it does not seem to work with two separate sheets that have been concatenated and fit to the same non linear function. has anyone else tried this or have any suggestions?
My main goal is to fit a bunch of data for control and a bunch from treated data sets to the same non linear function and determine whether overall they are significantly different.
any help would be much appreciated.
cheers,
tina |
|
greg
USA
1378 Posts |
Posted - 04/22/2014 : 1:49:08 PM
|
For some reason, the fitcmpdata dialog does not "see" fit reports of Concatenated Data. Possibly because there are more than one datasets in the fits. I believe the fitcmpdata X-Function still works so all we have to do is devise our own dialog.
// BEGIN SCRIPT // Gather all the sheets with "Concatenated Data" in their Long Name string strReports; count = 0; // Restrict to current folder doc -ef L { str$ = layer.longname$; nn = str.Find("Concatenated Data"); if(nn) { if(count == 0) strReports$ = [%H]"%(str$)"; else strReports$ = %(strReports$)|[%H]"%(str$)"; count++; } }
// Put up a dialog to choose two reports that used the same function (no checking) dataset dsSel; dlgChkList inames:=strReports$ title:="Concateneated Data Fit Comparison" desc:="Please select only TWO cases using the SAME models" osel:=dsSel;
// Run the fitcmpdata X-Function if(dsSel.GetSize() == 2) { str1$ = strReports.GetToken(dsSel[1],"|")$; str2$ = strReports.GetToken(dsSel[2],"|")$; fitcmpdata -r 1 result1:=str1$ result2:=str2$; } else ty -b You must select exactly two reports.; // END SCRIPT
After running the same fit function on two sets of concatenated data, copy and paste the above script to the Command Window and press Enter. Select exactly 2 reports that used the same function and click OK.
Note that the responsibility is yours to verify that each fit uses the same function. I tested in a simple "2 & 2" case: two datasets were concatenated and fit and another two datasets were concatenated and fit with the same function and the results seemed reasonable.
Note that fitcmpdata is a Pro feature and that older Origins would have to replace str$ = layer.longname$; with str$ = layer.name$; |
|
|
Sam Fang
293 Posts |
Posted - 05/03/2014 : 10:49:29 PM
|
Origin's Compare Datasets tool didn't support two fits from concatenated data sets. Even using Greg's workaround to avoid the limitation from the dialog, the result is still not right.
As a workaround, if you want to compare datasets, you can not use concatenated data fit but copy concatenated data in a column, and fit data in the new column, then use Compare Datasets tool.
In the future, we will make a new Compare Datasets tool which can avoid these limitations.
Sam OriginLab Technical Services |
|
|
|
Topic |
|
|
|