2.4.2 fitcmpdata(Pro)

Menu Information

Analysis: Fitting: Compare Datasets

Brief Information

Compare two datasets using a specified fitting model

Additional Information

It is not accessible from script. This feature is for OriginPro only.

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Fit Result1 result1

Input

Range

Specifies fit report sheets fitted with the same model and different dataset.
Fit Result2 result2

Input

Range

Specifies fit report sheets fitted with the same model and different dataset.
Fit Parameters param

Input

int

1 Decide whether to output Fit Parameter table for each dataset.
Fit Statistics statics

Input

int

1 Decide whether to output Fit Statistics table for each dataset.
1st Dataset Name name1

Input

string

Data1 Specify the display name for the first dataset in the report sheet.
2nd Dataset Name name2

Input

string

Data2 Specify the display name for the second dataset in the report sheet.
Results rt

Output

ReportTree

<new> Specify where to put the output report.

Description

This tool compares two datasets by fitting the same function. It is used to determine whether two datasets are significantly different from each other for the same fitting model. Thus, the tool determines if the two datasets are representative samples from the same population or not.

To use this tool, please pay attention to following

  • Input for this tool is fit report sheets (Linear Fit, Polynomial, Nonlinear Curve Fit, etc). So fit tools need to be run before you use this tool
  • When use the fit tool, please set recalculate mode of fit tools as Auto or Manual
  • Consolidated Report (all the fitting result reports of multi-datasets are in one worksheet) can not be recorgnized, so we need to ensure that results are in separate sheet when fitting multiple datasets.

Examples

This example implements the data comparison below with Labtalk script.

fname$=system.path.program$ + "Samples\Curve Fitting\Exponential Decay.dat"; // prepare the data
newbook;
impasc;
nlbegin 1!2 ExpDec1 tt;  // nonlinear fitting on column 2
nlfit;
nlend 1 2;   ;
nlbegin 1!3 ExpDec1 tt;  // nonlinear fitting on column 3
nlfit;
nlend 1 2;  
fitcmpdata -r 2 result1:=2! result2:=4!;   // compare the two datasets based on the fitting results of the exponential function.

Suppose we have 2 datasets and would like to see whether they are different for same model,

Fitcmpdata help English files image002.gif

Operation

1. Import Exponential Decay.dat on \Samples\Curve Fitting folder.

2. Highlight Col(B), select Analysis: Fitting: Nonlinear Curve Fit to open dialog. Set Function as ExpDec1. Click OK to get result sheet.

3. Highlight Col(C) and select Analysis: Fitting: Nonlinear Curve fit: 1<last used> to quick fit Col(C) with same model.

4. Select Analysis: Fitting: Compare Datasets to open dialog.

5. Click browse button to open Report Tree Browser and select 1 item for Fit Result1.

6. Repeat same operation to select another item for Fit Result2.

7. Select Fit Parameters and Fit Statistics and click OK.

8. From F-test table, we can roughly draw conclusion that Col(B) and Col(C) are different when fit with expDec1 model.

Algorithm

F Statistic:

Fitcmpdata help English files image004.gif
Where Fitcmpdata help English files image006.gif, Fitcmpdata help English files image008.gif
RSS1 is residual sum of square of fit with 1st dataset, RSS2 is residual sum of square of fit with 2nd dataset. SSRcombined is residual sum of square of fit with combined data of 1st dataset and 2nd dataset.

Prob:

1-Fitcmpdata help English files image010.gif

Related X-Functions

fitcmpmodel