onetPermutation | R Documentation |
This function computes the p-value for the one sample t-test using a permutation test. The permutation density can also be plotted.
onetPermutation(x = DAAG::pair65$heated - DAAG::pair65$ambient, nsim = 2000,
plotit = TRUE)
x |
a numeric vector containing the sample values (centered at the null hypothesis value) |
nsim |
the number of permutations (randomly selected) |
plotit |
if TRUE, the permutation density is plotted |
This function calculates only a one-sided p-value. The
EnvStats::oneSamplePermutationTest
in the EnvStats package
offers a choice between two-sided and one-sided tests. If the
statmod package is available, a correction will be applied
that accounts for a small bias that results when permutations are
sampled.
The p-value for the test of the hypothesis that the mean of x
differs from 0
J.H. Maindonald
Good, P. 2000. Permutation Tests. Springer, New York.
onetPermutation()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.