Functions & Formulae

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

Antithetic variates estimator of an expected model output

mu_anti = (1/n) * sum_(i=1)^(n/2) (f(X_i) + f(X~_i)); X~_i = 1 - X_i for uniform inputs

Estimates the expected value of a simulation model's output, such as expected costs, QALYs or net monetary benefit, by running the model on n/2 independent sets of random inputs and again on their mirror images, then averaging all n results. For uniform random numbers the mirror image of U is 1-U, applied before the numbers are transformed into parameter values or event times; for a normal input it is the reflection about the mean. The estimate is unbiased, and its variance depends on the correlation between the outputs of the two members of each pair, so the method helps when that correlation is negative.

  • Variance of the antithetic variates estimator with within-pair correlation

    Var_anti = sigma2 / n * (1 + rho)

    Gives the variance of the antithetic estimate based on n model evaluations arranged as n/2 independent pairs. Ordinary sampling with n independent evaluations has variance sigma2/n, so the factor 1 + rho measures the gain: a negative within-pair correlation lowers the variance and a positive one raises it. Because rho cannot be below -1 or above +1, the factor runs from 0 to 2: in the best case one pair gives the exact answer, and in the worst case the variance doubles.

  • Standard error of the antithetic estimate from pair means

    SE_anti = s_anti / sqrt(m)

    Gives the Monte Carlo standard error of the antithetic estimate by treating each pair as one observation. Each pair mean is the average of the two outputs in a pair, s_anti is the sample standard deviation of the m pair means and m equals n/2. The same rule applies to mean costs and QALYs, the probability that a strategy is cost-effective and each point on the cost-effectiveness acceptability curve estimated from paired PSA iterations.

  • Antithetic variance reduction factor and equivalent independent sample size

    VRF = 1 / (1 + rho); n_eq = n / (1 + rho)

    Converts the within-pair correlation into the variance reduction factor, the variance of ordinary sampling divided by that of antithetic sampling at the same number of evaluations, and into the number of independent evaluations that would match the precision of n antithetic evaluations. A factor above 1 means pairing helps and a factor below 1 means it harms.

Antithetic Variates — Functions & Formulae | HealthEconomics.wiki