View source: R/CalcGroupPsiCWS.R
CalcGroupPsiCWS | R Documentation |
This statistic computes the complementary weighted squared (CWS) differences between the averaged subject empirical cumulative distribution functions for the two samples. For more information, see \insertCitemckinney2022extensions;textualdistdiffR and \insertCitemckinney2021extensions;textualdistdiffR.
CalcGroupPsiCWS(data, groups, subjects)
data |
A two column matrix of the bivariate pooled samples |
groups |
A numeric vector of sample (or group) labels (use either 1 or 2) |
subjects |
A numeric vector of subject labels |
The Psi CWS statistic for aggregated group data
mckinney2022extensionsdistdiffR
\insertRefmckinney2021extensionsdistdiffR
# Randomly assign all three species to two samples data(iris) iris$Species <- rep(1:3, each = 50) # Species will serve as the subject label irisPermuted <- iris[sample.int(nrow(iris)), ] sample1 <- as.matrix(irisPermuted[1:75, c(1:2, 5)]) sample2 <- as.matrix(irisPermuted[76:150, c(1:2, 5)]) pooled_data <- rbind(cbind(sample1, 1), cbind(sample2, 2)) CalcGroupPsiCWS(pooled_data[, 1:2], pooled_data[, 4], pooled_data[, 3])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.