View source: R/ComputePermutation.R
| permute_within_two_condition_bins | R Documentation |
Permutes the values of one vector within joint bins defined by two condition vectors. This function is intended for internal use only and should not be accessed by package users.
The two condition vectors are each split into quantile-based bins. Joint bins are then defined by the combination of the two bin assignments. Values of the target vector are randomly permuted only within each joint bin. This preserves the approximate relationship between the target vector and both condition variables while breaking the original sample-wise ordering within local strata.
permute_within_two_condition_bins(y, condi1, condi2, bin = 8)
y |
A vector to be permuted. |
condi1 |
A numeric vector used to define the first set of bins. |
condi2 |
A numeric vector used to define the second set of bins. |
bin |
An integer specifying the number of bins for each condition vector. Default is 8. |
A vector with the same length as 'y', where values have been permuted within joint bins defined by 'condi1' and 'condi2'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.