twPERM {ppiStats} | R Documentation |
This function takes the entries of a two-way table and creates two binary logical vectors upon which it computes a permutation test to check for independence.
twowayPERM( v1, v2, NPERM, stat, seed = 123) makeBinVect(n11, n12, n21, n22)
v1 |
A logical vector. |
v2 |
A logical vector the same length as v1. |
NPERM |
A positive integer. The number of tests to be conducted. |
stat |
A statistical function passed into to test the permutation on two vectors. |
seed |
A positive integer. To set the seed for the random number generator. |
n11 |
A postive integer. The value of (1,1) in the two way table. |
n12 |
A postive integer. The value of (1,2) in the two way table. |
n21 |
A postive integer. The value of (2,1) in the two way table. |
n22 |
A postive integer. The value of (2,2) in the two way table. |
A numeric vector containing the p-values for the test that the permutation of the vector v1 is independent from v2.
T Chiang
x <- makeBinVect(13, 17, 23, 71)