I have data from an experiment that I analyzed using t-tests. The dependent variable is interval scaled and the data are either unpaired (i.e., 2 groups) or paired (i.e., within-subjects).
E.g. (within subjects):
x1 <- c(99, 99.5, 65, 100, 99, 99.5, 99, 99.5, 99.5, 57, 100, 99.5,
99.5, 99, 99, 99.5, 89.5, 99.5, 100, 99.5)
y1 <- c(99, 99.5, 99.5, 0, 50, 100, 99.5, 99.5, 0, 99.5, 99.5, 90,
80, 0, 99, 0, 74.5, 0, 100, 49.5)
However, the data are not normal so one reviewer asked us to use something other than the t-test. However, as one can easily see, the data are not only not normally distributed, but the distributions are not equal between conditions:
Therefore, the usual nonparametric tests, the Mann-Whitney-U-Test (unpaired) and the Wilcoxon Test (paired), cannot be used as they require equal distributions between conditions. Hence, I decided that some resampling or permutation test would be best.
Now, I am looking for an R implementation of a permutation-based equivalent of the t-test, or any other advice on what to do with the data.
I know that there are some R-packages that can do this for me (e.g., coin, perm, exactRankTest, etc.), but I don't know which one to pick. So, if somebody with some experience using these tests could give me a kick-start, that would be ubercool.
UPDATE: It would be ideal if you could provide an example of how to report the results from this test.
Best Answer
It shouldn't matter that much since the test statistic will always be the difference in means (or something equivalent). Small differences can come from the implementation of Monte-Carlo methods. Trying the three packages with your data with a one-sided test for two independent variables:
To check the exact p-value with a manual calculation of all permutations, I'll restrict the data to the first 9 values.
coin
andexactRankTests
are both from the same author, butcoin
seems to be more general and extensive - also in terms of documentation.exactRankTests
is not actively developed anymore. I'd therefore choosecoin
(also because of informative functions likesupport()
), unless you don't like to deal with S4 objects.EDIT: for two dependent variables, the syntax is