[R] Exact Permutation test

From: Stropharia <stevenworthington_at_hotmail.com>
Date: Wed, 02 Apr 2008 14:15:06 -0700 (PDT)

R users,

Is it possible to do 'exact' permutation tests in R? If I run a perm.test or permutation.test.discrete on a data set that has, for example, 720 possible permutations, will that test permute ALL of those possible permutations, or will it just permute 720 random permutations (thus allowing some possibilities to repeat and some not to be permuted at all)?

I'm a little confused by how to code for a permutation test where I will have several subsets within the data that need to be maintained, for example:

Labels: A B C D E F
Codes: 0 0 2 1 1 1

In the above data, if I want to permute all possible combinations of the 'Codes', while maintaining the quantities of zeros, ones and twos in each permutation, I would compute - 5!/(2!)(1!)(3!) = 10. Is there a way to code a permutation test so that it will compute all possible combinations like in the above example, and then dump each permutation into a separate column vector?

Thanks in advance for any help with this. Much appreciated.


View this message in context: http://www.nabble.com/Exact-Permutation-test-tp16451864p16451864.html
Sent from the R help mailing list archive at Nabble.com.

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 02 Apr 2008 - 21:19:15 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 03 Apr 2008 - 01:30:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive