# Consider a two-sided permutation test with 99 permutations,
# 5 reaching the statistically significant threshold.
# Assume a two group experiment with 6 in each group.
# Input total.nperm=462
permp(x=5, nperm=99, total.nperm=462)
# Input n1=6 and n2=6
permp(x=5, nperm=99, n1=6, n2=6)
# Suppose we have a vector of p-values taking on the values 0 to 10 for the same experiment described above.
x<-0:10
permp(x=x, nperm=99, total.nperm=462)
Run the code above in your browser using DataCamp Workspace