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
 All Forums
 Origin Forum
 Origin Forum
 KS test, Cumulative fraction plot

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
kr5z Posted - 05/31/2006 : 12:28:01 PM
Origin Version (Select Help-->About Origin): 7.5 SR6
Operating System: XP

Hello: I am a new user of Origin and would appreciate if anybody could tell me if its possible to perform a KS test in Origin.

I would also like to know if its possible and if so, how to generate a cumulative fraction plot by importing values from a spreadsheet.

Thanks a lot!
Karthik
3   L A T E S T    R E P L I E S    (Newest First)
minimax Posted - 08/18/2006 : 8:08:27 PM
Hi Karthik,

You are welcome.

BTW, the KS tests will be implemented directly in the next coming version of Origin, Origin8. At that time, I think you can use it more flexibly.

Max
OriginLab GZoffice
kr5z Posted - 08/18/2006 : 3:59:47 PM
Sorry for the belated reply and thank you for the suggestions. I will try it out.
Karthik
minimax Posted - 05/31/2006 : 9:58:43 PM
Dear Karthik,

Does the KS test mean for one-sample Kolmogorov-Smirnov test?

If so, currently Origin7.5 does not directly provide the KS test. However, since Origin includes many functions from NAG (the Numerical Algorithms Group library), now you can carry out the test simply by a patch of OriginC codes.

Copy the following codes into Origin workspace, compile it, type ks_test in the script window and then press Enter key to execute it.
If you are fresh to the programming, you can refer to the Origin programming help file: Code Builder User Guide: Introduction. This chapter explains the basics of how to program with the code builder.


#include <NAG\OCN_g08.h>
void ks_test()
{
// suppose the active window is a worksheet
Worksheet wks = Project.ActiveLayer();
if(!wks)
return;

// suppose the test data is stored in column(A)
Dataset dsA(wks,0);
vector vData =dsA;

int nRet;

double par[2];
Nag_ParaEstimates estima;
estima = Nag_ParaEstimated;

Nag_TestStatistics dtype;
dtype = Nag_TestStatisticsDAbs;
double dD, dZ, dP;

// perform a one sample Kolmogorov-Smirnov test to examine if the data obeys Normal distribution
nRet = nag_1_sample_ks_test(vData.GetSize(), vData, Nag_Normal, par, estima, dtype, &dD, &dZ, &dP);

// output test results, where "Tail probability" tells the probability that the data is from a Normal distribution
printf("Test against Normal distribution with parameters estimated from the data\n");
printf("\n");
printf("Mean = %8.4f\n", par[0]);
printf("Variance = %8.4f\n", par[1]);
printf("Test statistics D = %8.4f\n", dD);
printf("Z statistic = %8.4f\n", dZ);
printf("Tail probability = %8.4f\n", dP);
}


For more detail on the usage of the function nag_1_sample_ks_test(), you can turn to g08cbc document inside folder \NAG PDFs. (If you did not install the PDFs previously, you can install them by running the Origin "Add or Remove Files" program.)

Moreover, if your KS test means for two-sample Kolmogorov-Smirnov test, you can look at function nag_2_sample_ks_test() and create similar codes to test.

With regards to the cumulative fraction plot, you can simply use menu plot--Statistical Graphs--Histogram+Probablities to create a desirable graph.

Hope it works. If you still encounter any problems, feel free to contact our Technical Support

Max
OriginLab GZoffice

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000