[R] Nonparametric test of randomness (Run Test)
Ajay Shah
ajayshah at mayin.org
Wed Mar 3 05:35:12 CET 2004
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
More information about the R-help
mailing list