Functions & Formulae

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

Design effect of a clustered or weighted sample and the effective sample size it implies

d(V_design, V_SRS, n, m, rho, CV_w, CV, m_bar, n_s, P_NR, w_j, n_j) = (DEFF, DEFT, n_eff, DEFF_w, DEFF_u, n_des, k_raw, n_w)

Maps the variance of an estimate under a complex sample, or the cluster size, intracluster correlation and survey weights behind that variance, to the design effect, its square root, the effective sample size and the sample size a precision target needs. The simple random sample variance of a proportion is the square of SE_p in HE-FM-BINOM-004, and the independence assumption of a binomial count, HE-AS-BINOM-002, fails under clustering. An interval around a survey estimate is HE-FM-AN-001 with the inflated standard error. A beta distribution for a clustered survey proportion is HE-FM-BETA-003 with that inflated standard error, and its parameters then sum to the effective sample size minus 1 (derived), so neither is restated here. The prevalence itself under survey weights is HE-FM-XSD-001. Notation follows the Design Effect article.

  • Design effect as a variance ratio with its square root and effective sample size

    DEFF = V_design / V_SRS; DEFT = sqrt(DEFF); n_eff = n / DEFF; n_cap = min(n, n_eff)

    Divides the variance of an estimate under the complex sample by its variance under a simple random sample of the same size. The square root, DEFT, is the factor by which the standard error grows, and the sample size divided by DEFF is the number of independent observations that would carry the same information. DEFF can fall below 1, so the US National Center for Health Statistics (NCHS) also caps the effective size at the actual size when it applies a minimum sample size rule. For a proportion V_SRS is the square of SE_p in HE-FM-BINOM-004, which makes n_eff equal to p (1 minus p) over V_design, the second form NCHS prints.

  • Design effect from cluster size, intracluster correlation and a survey weight term

    DEFF_c = 1 + (m - 1) * rho; DEFF_w = DEFF_c * (1 + CV_w^2)

    The first part is the inflation factor that the CONSORT extension for cluster randomised trials gives for clusters of equal size. It rises with m when rho is above zero, because each extra person in a cluster adds less new information. The second part multiplies by the weighting term of the WHO manual for surveys with unequal weights, and it equals the first part when CV_w is zero. The effective sample size then follows from the third part of HE-FM-DESE-001. At m = 2 the first part takes the form of the factor 1 + rho in HE-FM-ANTV-001, which computes it only for mirrored pairs of simulation runs; the cluster form holds for any m (derived).

  • Design effect for clusters of unequal size from the mean and spread of cluster size

    m_w = (CV^2 + 1) * m_bar; DEFF_u = 1 + (m_w - 1) * rho

    Rutterford, Copas and Eldridge print this form as their equation 17, for designs where cluster sizes vary and only the mean and standard deviation of size are known at the planning stage. The chain first raises the mean cluster size for the spread of sizes. The second part is the first part of HE-FM-DESE-002 with m_w in place of m, so CV of zero returns the equal-cluster value. The computational function below takes the size of each cluster instead.

  • Sample size, clusters and non-response inflation under a design effect

    n_des = n_s * DEFF; k_raw = n_des / m; I_NR = 100 / (100 - P_NR); n_visit = n_des * I_NR

    Multiplies the sample size that a simple random sample would need for a precision target by the design effect, divides by the people per cluster to give the clusters needed, and inflates for non-response as the WHO manual does. DEFF comes from HE-FM-DESE-002 or HE-FM-DESE-003 at the same m. The first part is the relation of HE-FM-DESE-001 read the other way, with n_s as the effective sample size wanted. The calculator returns the unrounded k_raw; the Excel Implementation rounds it up, as the article's table does. n_s is an input from the wider sample size calculation. For a two-arm trial with a continuous outcome and a minimal important difference as the target, HE-FM-MCID-005 gives it per arm, and n_des and k_raw are then per arm too.

  • Effective sample size and weighting term of a weighted sample with three weight classes

    n = n_1 + n_2 + n_3; n_w = (n_1 * w_1 + n_2 * w_2 + n_3 * w_3)^2 / (n_1 * w_1^2 + n_2 * w_2^2 + n_3 * w_3^2); D_w = n / n_w; CV_w = sqrt(max(D_w - 1, 0))

    NICE DSU Technical Support Document 18 gives the approximate effective sample size of a weighted population as the squared sum of the weights over the sum of the squared weights. The calculator holds three classes of respondents, each with one weight, in the layout of HE-FM-XSD-001, and the Excel Implementation takes a column of individual weights. Actual size over effective size is the weighting term, which equals 1 + CV_w^2 in HE-FM-DESE-002 when CV_w uses divisor n (derived, no mismatch on 100,000 random lists), so the last part recovers CV_w from it.

This set of formulae is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).

Author: Dr Darrin Baines · Publisher: Intelligent Parameters Ltd · Identifier: https://healtheconomics.wiki/concept/design-effect/formulae

Design Effect — Functions & Formulae | HealthEconomics.wiki