es_stat: es_stat: Function for calculating effect size statistics

View source: R/es_stat.R

es_statR Documentation

es_stat: Function for calculating effect size statistics

Description

Function for calculating common effect size statistics. Effect size statistics include both the effect size itself and its sampling error. This function estimates both commonly used effect sizes (Hedges' d & g, Zr, lnOR, lnRR) along with an ability to convert between the different effect size statistics. For two-group comparisons, directionally is dependent on the group used for m1 or p1. In all cases, m1 - m2 or p1 - p2 is contrasted.

Usage

es_stat(
  m1,
  m2,
  sd1,
  sd2,
  n1,
  n2,
  p1,
  p2,
  r,
  nr,
  type = c("d", "g", "Zr", "lnOR")
)

Arguments

m1

Mean of group 1

m2

Mean of group 2

sd1

Standard deviation of group 1

sd2

Standard deviation of group 2

n1

Sample size of group 1

n2

Sample size of group 2

p1

Proportion in group 1. Used with type = "lnOR" only.

p2

Proportion in group 2. Used with type = "lnOR" only.

r

Correlation coefficient. Used with type = "r" only .

nr

Sample size used for estimating the correlation coefficient. Used with type "r" only.

type

The type specifies the specific effect statistics one wishes to calculate. Types include: "d" = Hedges' d, "g" = bias corrected Hedges' d, "Zr" = Fisher's z-transformed correlation coefficient,"lnOR" = log odds ratio.

Value

Function returns the effect size and its sampling variance in a matrix (two column, n rows). The arguments can be vectors.

Author(s)

Daniel Noble - daniel.noble@unsw.edu.au


daniel1noble/metaAidR documentation built on Oct. 14, 2023, 3:23 p.m.