Description Usage Arguments Details Value Author(s)
Perform a permutation test (stratified by stages)
1 2 3 |
x1 |
First stage observations |
x2 |
Second stage observations |
g1 |
First stage group assignments |
g2 |
Second stage group assignments |
stat |
Function that computes test statistic |
B |
Number of permutations to use |
x3 |
Third stage observations |
g3 |
Third stage group assignments |
restricted |
Should group sizes be considered fixed |
type |
Type of p-value to compute (see details) |
stratified |
should permutation be stratified by stage |
type
specifies which permutation p-value to use. "non-randomized" will use the p-value of the non-randomized permutation test. "randomized" will use a randomized p-value that subtracts a random quantity from the non-randomized p-value, such that the a test that rejects for p <= alhpa
has size exactly alpha
. "midp" computes the mid-p-value which is the expected value of the randomized p-value. Davison-Hinkley returns the fraction between the permutation test statistics larger than t
plus one and the permutation test statistics different from t
plus one. The latter is mostly usefull when not all possible permutations are used.
p-value of the permutation test
Florian Klinglmueller
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.