View source: R/pairwise-comparisons.R
permutation_test | R Documentation |
The implementation of the permutation test follows the
function
permutationTest
from the surveillance
package by Michael Höhle,
Andrea Riebler and Michaela Paul.
The function compares two vectors of scores. It computes the mean of each
vector independently and then takes either the difference or the ratio of
the two. This observed difference or ratio is compared against the same
test statistic based on permutations of the original data.
Used in get_pairwise_comparisons()
.
permutation_test(
scores1,
scores2,
n_permutation = 999,
one_sided = FALSE,
comparison_mode = c("difference", "ratio")
)
scores1 |
Vector of scores to compare against another vector of scores. |
scores2 |
A second vector of scores to compare against the first |
n_permutation |
The number of replications to use for a permutation test. More replications yield more exact results, but require more computation. |
one_sided |
Whether or not to compute a one-sided test. Default is
|
comparison_mode |
How to compute the test statistic for the comparison of the two scores. Should be either "difference" or "ratio". |
p-value of the permutation test
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.