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
 Local Correlation Tracker
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

thiago.maf

22 Posts

Posted - 04/09/2011 :  12:06:25 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.0 SR4
Operating System: Win7

Hello,
I must develop a program (preferably in Labtalk) that do a search in a data series and returns the numerical value #8203;#8203;of the local Pearson coefficients. For this I need a loop that traverses the data and return me the various Pearson coefficients in a new table - not in the Report.

Is there a function that returns the Pearson coefficient - int value?

Thanks,
Thiago

AmandaLu

439 Posts

Posted - 04/11/2011 :  02:42:50 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi thiago.maf,

To get the Pearson correlation coefficient from the report sheet, you can use X-Function "getresults". The following scripts show you a simple example to use "getresults".


string fname$=system.path.program$ + "Samples\Statistics\correlations.dat";
newbook;
impASC;
corrcoef irng:=1!(col(2),col(3)) pearson:=1 rt:=<new name:="Pearson_Result">;
newsheet name:="Result" label:="Heightcrn|SelfEsteern";
range Heightcrn=Result!col(1);
range SelfEsteern=Result!col(2);
getresults iw:=2! tr:=mytree;
Heightcrn[1]=mytree.peasoncorr.corr1.c1;
SelfEsteern[1]=mytree.peasoncorr.corr1.c2;


For detailed information about "getresults", please refer to the following page:
http://www.originlab.com/www/helponline/Origin/en/Programming/mergedProjects/X-Function/X-Function/Getresults.html

Edited by - AmandaLu on 04/11/2011 03:04:12 AM
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