PropToroShiftData | R Documentation |
The PropToroShiftData()
function produces a list of toroidal shifted
versions of the two-column input matrix. The number of toroidal shifts
is (the ceiling of) the proportion (propPnts
) multiplied by the combined
sample size. The origins of the toroidal shifts are randomly selected from
the combined samples. The pooled data
is assumed to list all of the first
sample of size n1
before the second sample (of size n2
).
PropToroShiftData(data, n1, n2, propPnts = 1)
data |
A two column matrix of the pooled samples |
n1 |
An integer sample size for the first sample |
n2 |
An integer sample size for the second sample |
propPnts |
A numeric proportion of points to be used as toroidal shift origins |
A list of toroidal shifted pooled sample matrices
data(iris) sample1 <- as.matrix(iris[iris$Species == "setosa", 1:2]) sample2 <- as.matrix(iris[iris$Species == "virginica", 1:2]) pooled_data <- rbind(sample1, sample2) n1 <- nrow(sample1) n2 <- nrow(sample2) # Creates a list of 0.1 times (n1 + n2) = 10 toroidal shifts of the pooled data output <- PropToroShiftData(pooled_data, n1, n2, 0.1) summary(output)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.