pval: Permutations-methods p-values for difference in means, medians, or Wilcoxon rank sum test
Description
Calculate p-values for a two-sample permutation or randomization test.
In other words, we set up a permutation or randomization test to evaluate
the null hypothesis that groups A and B have the same distribution,
then calculate p-values for several alternatives:
a difference in means (value="m"),
a difference in medians (value="d"),
or the Wilcoxon rank sum test (value="w").
Which tail? Either "Two"- or "Left"- or "Right"-tailed test.
value
Either "m" for difference in means (default);
"s" for sum of Group 1 values
[equivalent to "m" and included only for sake of checking results against
Nguyen (2009) and Ernst (2004)];
"d" for difference in medians;
or "w" for Wilcoxon rank sum statistic;
or "a" for a named vector of all four p-values.
Value
Numeric p-value for the selected type of test,
or a named vector of all four p-values if value="a".