Functions & Formulae

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

First-order delta method variance of a function of estimated parameters

v(g, theta_hat, Sigma) = (Var_g, SE_g)

Takes a differentiable function g, its estimated inputs and their variances and covariances, and returns an approximate sampling variance and standard error for the output, by replacing g with its tangent at the estimates. Its result feeds the Wald interval of HE-FM-AN-001. The live ICER case is HE-FM-AN-002, with its Fieller alternative HE-FM-AN-003 and all three intervals in HE-CF-AN-001; net benefit, which is linear, is HE-FM-AN-004; the log risk ratio variance of one trial is HE-FM-PWMA-001, which equals the delta-method form Zepeda-Tello and colleagues derive (eq. 30, equal on a 144-point grid, derived); the variance of Hedges' g in HE-FM-HEDG-002 takes the same form with its correction factor J as a constant slope (derived). Those records fix the function, and this package holds the general rule with the slope or gradient as an input, plus one survival use. The second-order approximation to the mean of g is HE-FM-EV-002. Notation follows the Delta Method article.

  • Delta-method variance of a smooth function of one estimate

    Var_g = d_g^2 * Var_X; SE_g = sqrt(Var_g)

    Multiplies the variance of the estimated input by the square of the function's slope at the estimate, because near that point the function behaves like its tangent line. The standard error is the square root, so it equals the absolute slope times the standard error of the input. The slope is worked out for the function in hand and entered as a number. A Wald interval follows from HE-FM-AN-001 with SE_g as its standard error. The approximation describes spread only and leaves the point estimate g(X) unchanged.

  • Delta-method variance of a function of two correlated estimates

    Var_g = g_X^2 * Var_X + g_Y^2 * Var_Y + 2 * g_X * g_Y * Cov_XY; SE_g = sqrt(Var_g)

    Expands the gradient form of the delta method for two estimated inputs into three terms, one for each input variance and one for their covariance. The two partial derivatives are entered as numbers, so the same line serves any differentiable function of the pair. With derivatives 1 / Delta_E and -Delta_C / Delta_E^2 it returns the squared standard error of the ICER in HE-FM-AN-002; with derivatives lambda and -1 it returns the exact variance of net benefit in HE-FM-AN-004. The covariance term takes its sign from the covariance and from both derivatives. With more than two inputs the same rule is the quadratic form of the gradient and the covariance matrix, which HE-CF-DELM-001 computes.

  • Delta-method standard error of exponential mean survival from events and follow-up

    lambda = N_e / T; Var_lambda = lambda^2 / N_e; mu = 1 / lambda; Var_mu = Var_lambda / lambda^4; SE_mu = sqrt(Var_mu); mu_L = mu - z * SE_mu; mu_U = mu + z * SE_mu; SE_logmu = SE_mu / mu; mu_LL = exp(log(mu) - z * SE_logmu); mu_LU = exp(log(mu) + z * SE_logmu)

    Fits a constant hazard as events over total follow-up and takes mean survival as its reciprocal, the point values that HE-FM-BTH-003 and HE-FM-LTR-003 compute in their own settings. The new parts are the variances that Kearns and colleagues print, the hazard variance as the squared hazard over the number of events and the delta-method variance of mean survival as the hazard variance over the hazard to the fourth power, which is HE-FM-DELM-001 at slope -1 / lambda^2 (HE-EX-DELM-001). The standard error therefore depends on the number of events and not on the number of patients (derived). The natural-scale limits are the Wald form of HE-FM-AN-001. The log-scale limits use the relative standard error as the log-scale standard error (HE-EX-DELM-003) and take the form of HE-FM-HR-006, which computes it only for a log hazard ratio; the same form holds for log mean survival (derived, and the construction Zepeda-Tello and colleagues use for a risk ratio).

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/delta-method/formulae