sd_pooled {effectsize} | R Documentation |
The Pooled Standard Deviation is a weighted average of standard deviations for two or more groups, assumed to have equal variance. It represents the common deviation among the groups, around each of their respective means.
sd_pooled(x, y = NULL, data = NULL, verbose = TRUE, ...) mad_pooled(x, y = NULL, data = NULL, constant = 1.4826, verbose = TRUE, ...) cov_pooled(x, y = NULL, data = NULL, verbose = TRUE, ...)
x, y |
A numeric vector, or a character name of one in |
data |
An optional data frame containing the variables. |
verbose |
Toggle warnings and messages on or off. |
... |
Arguments passed to or from other methods. When |
constant |
scale factor. |
The standard version is calculated as:
sqrt(sum(c(x - mean(x), y - mean(y))^2) / (n1 + n2 - 2))
The robust version is calculated as:
mad(c(x - median(x), y - median(y)), constant = 1.4826)
Numeric, the pooled standard deviation. For cov_pooled()
a matrix.
sd_pooled(mpg ~ am, data = mtcars) mad_pooled(mtcars$mpg, factor(mtcars$am)) cov_pooled(mpg + hp + cyl ~ am, data = mtcars)