Dear all, Does R or S-plus or any of their packages provide Non-parametric "Run test" (which tests whether a sequence of numbers might be random or not)? If yes, i'd like a numerical illustration of this test. Any response / help / comment / suggestion will be greatly appreciated. Thanks in advance. ------------------------------- Mohammad Ehsanul Karim <wildscop at yahoo.com> Institute of Statistical Research and Training (ISRT) University of Dhaka, Dhaka -1000, Bangladesh ------------------------------- ====____________________________ WilDKiD <wildscop at yahoo.com>
I don't know the literature at all, but intuitively, you would need an ordering relation to be able to define `runs'. How would one do that in more than one dimension? Cheers, Andy> From: WilD KID > > Dear all, > > Does R or S-plus or any of their packages provide > Non-parametric "Run test" (which tests whether a > sequence of numbers might be random or not)? If yes, > i'd like a numerical illustration of this test. > > Any response / help / comment / suggestion will be > greatly appreciated. Thanks in advance. > > > > ------------------------------- > Mohammad Ehsanul Karim <wildscop at yahoo.com> > Institute of Statistical Research and Training (ISRT) > University of Dhaka, Dhaka -1000, Bangladesh > ------------------------------- > > ====> ____________________________ > > WilDKiD <wildscop at yahoo.com> > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > >------------------------------------------------------------------------------ Notice: This e-mail message, together with any attachments,...{{dropped}}
Hi Mohammad, There an implementation of Knuth's run test in the pLab programs. While these are apparently not being maintained anymore, there is a good description of the code here: http://random.mat.sbg.ac.at/team/#software Download this file - the Mathematica code is on page 65. Leeb, H. and Lendl, O.: pLab -- Library reference, Version 1.0. Report No. 4, pLab -- reports, University of Salzburg, 1997. Abstract and compressed postscript file available . Jim
Suppose you have a returns vector r, which contains values like +3, -2, -7, +3, etc. Then say: require(tseries); test = runs.test(factor(sign(r))) print(test) If you want to access the prob value of the test from within a program, this is found in test$p.value -- Ajay Shah Consultant ajayshah at mayin.org Department of Economic Affairs http://www.mayin.org/ajayshah Ministry of Finance, New Delhi