The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 comparing concatenated fits
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

thaase1

Canada
1 Posts

Posted - 04/19/2014 :  3:00:29 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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$;
Go to Top of Page

Sam Fang

293 Posts

Posted - 05/03/2014 :  10:49:29 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000