SMD_matrix: Standardized mean differences

SMD_matrixR Documentation

Standardized mean differences

Description

Calculate standardized mean differneces between all groups.

Usage

SMD_matrix(
  x,
  group,
  central_tendency = wtd_mean,
  dispersion = "sd",
  dispersion_method = "all",
  extended_output = F,
  CI = 0.95,
  str_template = "%d [%lower %upper]",
  digits = 2,
  reliability = 1,
  se_analytic = T,
  ...
)

Arguments

x

(numeric vector) A vector of values.

group

(vector) A vector of group memberships.

central_tendency

(function) A function to use for calculating the central tendency. Must support a parameter called na.rm. Ideal choices: mean, median.

dispersion

(character or numeric scalar) Either the name of the metric to use (sd or mad) or a value to use.

dispersion_method

(character scalar) If using one of the built in methods for dispersion, then a character indicating whether to use the pooled value from the total dataset (all), the pairwise comparison (pair), or the sd from the total dataset (total).

extended_output

(lgl) Whether to output a list of matrices. Useful for computational reuse.

CI

(num) Confidence interval coverage.

str_template

(chr) A string template to use.

reliability

(num) A reliability to use for correcting for measurement error. Done via adj_d_reliability().

se_analytic

(lgl) Use analytic standard errors. If not, then it will bootstrapping (slower). Always uses bootstrapping for non-mean functions.

...

(other arguments) Additional arguments to pass to the central tendency function.

Examples

SMD_matrix(iris$Sepal.Length, iris$Species)
SMD_matrix(iris$Sepal.Length, iris$Species, extended_output = T)
#pairwise SDs
SMD_matrix(iris$Sepal.Length, iris$Species, extended_output = T, dispersion_method = "pair")

Deleetdk/kirkegaard documentation built on Feb. 28, 2025, 5:04 p.m.