Functions & Formulae

Each applied formula has its own function page, with a signature, implementations, and tests.

Hedges' g small-sample correction, sampling variance and bias of the standardised mean difference

hedges(d, n_1, n_2) = (g, V_g, SE_g)

Maps Cohen's d, the uncorrected standardised mean difference of HE-FM-CD-001, and the two group sizes to Hedges' g, the same difference multiplied by a correction factor J that removes the upward small-sample bias of d, and to the variance and standard error of g that an inverse-variance meta-analysis needs. It also gives the standard error that Review Manager attaches to the same statistic, and the expected overstatement of a population standardised difference by d at a given number of degrees of freedom. The pooled standard deviation and d itself are HE-FM-CD-001 and are not restated. A confidence interval for g is the large-sample interval HE-FM-AN-001 applied with the standard error of g, the logistic conversion to a log odds ratio is HE-FM-CD-002 with g in place of d, and pooling g across studies is HE-FM-ADMA-001 for a common effect or HE-FM-ADMA-005 for random effects. Notation follows the Hedges' g article.

  • Hedges' g from Cohen's d with the approximate correction factor J

    m = n_1 + n_2 - 2; J = 1 - 3 / (4 * m - 1); g = J * d

    Multiplies the uncorrected standardised mean difference d of HE-FM-CD-001 by a correction factor J that depends only on the degrees of freedom m of the standard deviation used to standardise, which for the pooled standard deviation is the total sample size less 2. The factor 1 minus 3 over (4m minus 1) is Hedges' algebraic approximation to an exact factor written with gamma functions, which HE-CF-HEDG-001 computes. Substituting for m gives 1 minus 3 over (4N minus 9) with N the total sample size, the form Review Manager prints. J is below 1, so g is always nearer zero than d, and J approaches 1 as the sample grows.

  • Large-sample variance and standard error of Hedges' g

    V_d = (n_1 + n_2) / (n_1 * n_2) + d^2 / (2 * (n_1 + n_2)); V_g = J^2 * V_d; SE_g = sqrt(V_g)

    Gives the large-sample variance of d as a term for the precision of the mean difference, (n_1 + n_2) over n_1 n_2, plus a term that grows with the size of the effect, d squared over twice the total sample size. Multiplying d by the constant J multiplies its variance by J squared, so the variance of g is J squared times V_d and its square root is the standard error. J comes from HE-FM-HEDG-001 and d from HE-FM-CD-001. The inverse of V_g is the study's weight in HE-FM-ADMA-001 and HE-FM-ADMA-005, and HE-FM-AN-001 with SE_g gives the confidence interval.

  • Review Manager standard error of Hedges' adjusted g

    N = n_1 + n_2; SE_RM = sqrt(N / (n_1 * n_2) + g^2 / (2 * (N - 3.94)))

    Review Manager, the software Cochrane reviews use, gives the standard error of Hedges' adjusted g from the total sample size N, the two group sizes and the corrected estimate g, with N less 3.94 in the denominator of the effect term. It differs from SE_g of HE-FM-HEDG-002 because J is not applied as a multiplier and the effect term is g squared over twice (N less 3.94) in place of d squared over twice N, and it is slightly larger in small trials. Reproducing the weights of a Cochrane forest plot needs this form, while the article's interval uses HE-FM-HEDG-002. g comes from HE-FM-HEDG-001.

  • Expected overstatement of a population standardised effect by Cohen's d in small samples

    J = 1 - 3 / (4 * m - 1); E_d = delta / J; Bias_d = E_d - delta

    Gives the mean of the uncorrected estimate d over repeated samples when the population standardised difference is delta, using Hedges' result that this mean is delta divided by the exact factor, here replaced by the approximate J of HE-FM-HEDG-001. Bias_d is the amount by which d overstates delta on average. The relative overstatement Bias_d over delta depends only on m, and with the approximate J it is about 25% at 4 degrees of freedom, about 4% at 20 and under 0.4% at 198 (computed here). It describes the estimator before any correction and does not shrink when more small studies are averaged.

Hedges' g — Functions & Formulae | HealthEconomics.wiki