sd_pooled: Pooled Standard Deviation

Description Usage Arguments Details Value See Also Examples

View source: R/sd_pooled.R

Description

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.

Usage

1
2
3
sd_pooled(x, y = NULL, data = NULL, verbose = TRUE)

mad_pooled(x, y = NULL, data = NULL, constant = 1.4826, verbose = TRUE)

Arguments

x

A formula, a numeric vector, or a character name of one in data.

y

A numeric vector, a grouping (character / factor) vector, a or a character name of one in data. Ignored if x is a formula.

data

An optional data frame containing the variables.

verbose

Toggle warnings and messages on or off.

constant

scale factor.

Details

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)

Value

Numeric, the pooled standard deviation.

See Also

cohens_d()

Examples

1
2

Example output

[1] 4.902029
[1] 4.860125

effectsize documentation built on Oct. 4, 2021, 9:06 a.m.