[R] A naive question about permutation tests in the coin package

Ista Zahn izahn at psych.rochester.edu
Sun Oct 25 06:33:21 CET 2009


Dear R helpers,
I am trying to understand how to use the independence_test function in
the coin package. I think I suffer from a misunderstanding about what
the package does. Either that or I do not understand how to use it
properly. Specifically, I cannot understand if I can test independence
of arbitrary statistics.

Take the following example:

set.seed(10)
d <- data.frame(y = c(rnorm(10, mean=3, sd = 5), rnorm(10, mean = 4,
sd = 4)), x = c(rep("condA", 10), rep("condB", 10)))

I've figured out how to do

(m.perm <- independence_test(y ~ x, data=d, distribution="exact"))

which tells me (I think) that the probability of these data assuming
no difference between the two groups is .0026. But unfortunately I
don't know what that means. My (limited) understanding of permutation
tests is that they can be used with arbitrary test statistics. But the
coin documentation indicates that only three teststats can be used:
"max", "quad" and "scalar". Without understanding what these are, I
don't feel that I understand the test.

Questions:
1) What are "max", "quad" and "scalar"? (book/article references would
be appreciated)
2) Can I use arbitrary test statistics with coin? For example, can I
test the independence of the variances using coin?

Thanks,
Ista








-- 
Ista Zahn
Graduate student
University of Rochester
Department of Clinical and Social Psychology
http://yourpsyche.org




More information about the R-help mailing list