Re: [R] Permutation tests for correlations

From: Achim Zeileis <Achim.Zeileis_at_wu-wien.ac.at>
Date: Thu 01 Dec 2005 - 03:44:19 EST

On Wed, 30 Nov 2005, Peter Dalgaard wrote:

> Apropos the question about permutation tests in multiple regression:
>
> We do have perm.test in package ExactRankTests, but it does one- and

just for the record: exactRankTests.

> two-sample tests, as in t.test, wilcox.test, etc. There doesn't seem
> to be an exact version of the permutation test for correlations, i.e.,
> the one that could be estimated using
>
> replicate(10000, cor(x,sample(y))) # or other values of 10000
>
> or, of course, computed exactly by enumeration of all the
> permutations, which is feasible up to length(x) == 10 or so.
>
> So I'm wondering: Is this due to lack of theory/algorithm or just lack of
> implementation?

Lack of looking at the right package ;-)

The package `coin' provides conditional inference for the independence problem in a rather flexible setup (in particular for arbitrary scales of x and y). It provides asymptotic p values as well as approximations (as you suggest above) to the exact distribution for all types of data and also the exact distribution if feasible. See   vignette("coin", package = "coin")
for more details.

Best,
Z



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Dec 01 04:31:23 2005

This archive was generated by hypermail 2.1.8 : Thu 01 Dec 2005 - 09:31:54 EST