Functions & Formulae

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

Bootstrap confidence interval from paired trial replicates

boot(c_T, e_T, c_U, e_U, lambda, B, alpha) = (L, U)

Maps patient-level costs and QALYs in two trial arms, a value per QALY, a replicate count and a tail probability to a confidence interval for incremental net monetary benefit read from percentiles of the replicates. Each replicate redraws whole patients with replacement within each arm, and its incremental cost, incremental effect and net benefit are differences in resampled means, the numerator and denominator of HE-FM-ICER-001 and the INMB of HE-FM-NMB-002. HE-FM-BOO-001 reads interval endpoints from the ordered replicates, HE-FM-BOO-002 moves the cut points for the bias-corrected and accelerated forms, HE-FM-BOO-003 estimates the acceleration by the jackknife and HE-CF-BOO-001 runs the resampling. The standard error from the same replicates is HE-FM-BSE-001, the normal interval built on it is HE-CF-BSE-001 and its closed form is HE-CF-BSE-002. The share of replicates with positive net benefit takes the form of HE-FM-CEAC-001, which is written for probabilistic simulations and which Fenwick, O'Brien and Briggs (HE-SR-CEAC-002) state for bootstrap replicates as well, so it is not restated. Notation follows the Bootstrapping article.

  • Percentile bootstrap interval endpoints read from the ordered replicates

    p_L = 1 + (B - 1) * lev_L; p_U = 1 + (B - 1) * lev_U; L = th_kL + (p_L - k_L) * (th_kL1 - th_kL); U = th_kU + (p_U - k_U) * (th_kU1 - th_kU)

    Sorts the B replicates of a statistic and reads the interval limits at two cut levels, usually alpha and 1 minus alpha for a central interval of coverage 1 minus 2 alpha. The cut level fixes a position p in the ordered list, and a position that falls between two replicates is resolved by linear interpolation, k being the integer part of p. Calculator lines take the two neighbouring ordered replicates as inputs, because sorting belongs in the Excel, R and Python code of HE-CF-BOO-001. The same reading applies to the moved cut levels that come from HE-FM-BOO-002. No normal shape is assumed for the replicates, which separates this interval from the normal interval of HE-CF-BSE-001.

  • Bias-corrected and accelerated normal deviates for the bootstrap cut points

    w_L = z_0 + z_alpha; w_U = z_0 - z_alpha; z_L = z_0 + w_L / (1 - a * w_L); z_U = z_0 + w_U / (1 - a * w_U)

    Moves the two cut levels of a bootstrap interval to allow for median bias and for a standard error that changes with the parameter. The bias corrector z_0 is the inverse normal of the share of replicates strictly below the original estimate, and the acceleration a comes from HE-FM-BOO-003 or is set to 0. The deviates z_L and z_U are the arguments of the standard normal cdf, so the cut levels are Phi(z_L) and Phi(z_U) in Excel and pass to HE-FM-BOO-001 as lev_L and lev_U. With a of 0 the formula gives the bias-corrected endpoint 2 z_0 + z_alpha, and with z_0 of 0 as well it returns the percentile cut. The calculator stops at the deviates because it has no normal cdf.

  • Jackknife acceleration constant from eight leave-one-out estimates

    J_bar = (J_1 + J_2 + J_3 + J_4 + J_5 + J_6 + J_7 + J_8) / 8; S_2 = (J_bar - J_1)^2 + (J_bar - J_2)^2 + (J_bar - J_3)^2 + (J_bar - J_4)^2 + (J_bar - J_5)^2 + (J_bar - J_6)^2 + (J_bar - J_7)^2 + (J_bar - J_8)^2; S_3 = (J_bar - J_1)^3 + (J_bar - J_2)^3 + (J_bar - J_3)^3 + (J_bar - J_4)^3 + (J_bar - J_5)^3 + (J_bar - J_6)^3 + (J_bar - J_7)^3 + (J_bar - J_8)^3; a = S_3 / (6 * S_2^1.5)

    Estimates the acceleration a of HE-FM-BOO-002 from the statistic recomputed with each row of the sample removed in turn. It takes the deviations of the leave-one-out values from their mean, and divides the sum of their cubes by 6 times the sum of their squares raised to the power 3/2. Eight values are written out so that the calculator can run, and SUMPRODUCT in Excel takes any number. For a sample mean the leave-one-out deviations are the patient deviations divided by n minus 1, so a equals the same ratio on the raw values (derived).

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/bootstrapping/formulae