Re: [R] Nonparametric test of randomness (Run Test)

2004-03-02 Thread Ajay Shah
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

Re: [R] Nonparametric test of randomness (Run Test)

2004-03-01 Thread Jim Lemon
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. a

[R] Nonparametric test of randomness [Run Test]

2004-03-01 Thread WilD KID
Dear Andy, Usual literature of runs: Run: a run is defined to be a maximum subsequence of like elements.[Mendenhall, Scheaffer, and Wackerly (1986), Mathematical Statistics with Applications, 3rd Ed., Duxbury Press, CA, Page 597] Run: a sequence of 1 or more identical symbols that is preceded an

RE: [R] Nonparametric test of randomness (Run Test)

2004-03-01 Thread Liaw, Andy
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"

[R] Nonparametric test of randomness (Run Test)

2004-03-01 Thread 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 adva