Negative likelihood ratio of a negative result on both of two tests with conditional covariances

When two tests are combined so that a person is called negative only if both are negative, the combined sensitivity Se_par and specificity Sp_par follow from the single-test values and the conditional covariances, C_pos among people with the condition and C_neg among people without it, in the joint probabilities that Wang, Lin and Nelson give. The combined ratio LR_neg_12 is then the LR_neg of HE-FM-DXA-002 applied to Se_par and Sp_par. With both covariances zero, the conditional independence that the article warns about, LR_neg_12 equals the product of the two single-test ratios (derived). A positive C_pos raises the ratio above that product, so multiplying the ratios overstates the rule-out, while a positive C_neg on its own lowers it below the product (derived).

Signature

Se_par = 1 - (1 - Se_1) * (1 - Se_2) - C_pos; Sp_par = Sp_1 * Sp_2 + C_neg; LR_neg_12 = (1 - Se_par) / Sp_par
Inputs
InputsDefinitionUnit
Se_1Sensitivity of the first test against the reference standardproportion
Se_2Sensitivity of the second test against the same reference standardproportion
C_posCovariance of the two results among people with the condition, the probability that both are negative minus (1 minus Se_1) times (1 minus Se_2); the same covariance applies to the positive results, and it is 0 under conditional independenceprobability
Sp_1Specificity of the first testproportion
Sp_2Specificity of the second testproportion
C_negCovariance of the two results among people without the condition, the probability that both are negative minus Sp_1 times Sp_2; 0 under conditional independenceprobability
Output
Se_parSensitivity of the rule that calls a person positive when either test is positive, one minus the probability that both are negative given the conditionproportion
Sp_parSpecificity of the same rule, the probability that both tests are negative given no conditionproportion
LR_neg_12Negative likelihood ratio of a negative result on both tests, the factor applied to the pre-test oddsratio

Function

Function for the negative likelihood ratio of a negative result on two tests with conditional dependence

Takes the sensitivities Se_1 and Se_2 and specificities Sp_1 and Sp_2 of two tests and their conditional covariances, C_pos among people with the condition and C_neg among people without it, and returns the negative likelihood ratio LR_neg_12 of a negative result on both, through the combined sensitivity and specificity of the rule that calls a person positive when either test is positive. LR_neg = (1 minus Se) / Sp is live as HE-FM-DXA-002, and the post-test probability after a negative result, one minus the negative predictive value of HE-FM-DXA-003, is the odds update that HE-VT-DXA-006 checks. The highest pre-test probability at which a negative result brings the risk down to p*, p* / (p* + (1 minus p*) LR_neg), and the largest ratio that does so at a pre-test probability p, p* (1 minus p) / ((1 minus p*) p), are that live update with one minus the negative predictive value set to p* and solved for p or for the ratio, so they are cited here and not drafted (derived). In the article's example the first is about 21.9%, and it is also the pre-test probability above which confirming everyone beats testing first when the triage test is free (derived). The article's threshold p* = C_conf / L_miss is the decision-curve threshold HE-FM-DCA-004 with G = L_miss minus C_conf and L = C_conf (derived). The pathway's net monetary benefit against confirming everyone and its break-even pre-test probability are HE-FM-DXA-005 and HE-CF-DXA-001 with confirming everyone entered as a test of sensitivity 1, specificity 0 and no cost (derived), which returns the article's 19.0%. Deeks and Altman note that likelihood ratios can be treated like risk ratios for confidence intervals, so the interval for LR_neg is HE-FM-PWMA-001 with a = FN, n1 = TP + FN, c = TN and n2 = TN + FP, exponentiated as in HE-FM-HR-006. Notation follows the Negative Likelihood Ratio article, with the two-test symbols added here.

Computational function

  • Computational function for conditional covariances and the joint negative likelihood ratio of two tests from cross-classified counts

    Takes the counts from a study in which every person had both tests and the reference standard and returns the single-test sensitivities and specificities, the conditional covariances C_pos and C_neg, the joint negative likelihood ratio LR_neg_12 of HE-FM-NLR-002 and the product LR_prod of the single-test ratios for comparison. The inputs are counts, not the formula's accuracy values. With the plug-in covariances the joint ratio equals the observed both-negative proportion among people with the condition divided by that among people without it (derived), so the procedure shows how much of that ratio the independence product misses.

    Inputs and outputs: n_D and n_N are the numbers of people with and without the condition on the reference standard. x_1D, x_2D and x_12D are the people with the condition who are negative on the first test, on the second test and on both. y_1N, y_2N and y_12N are the same counts among people without the condition. Se_1, Se_2, Sp_1 and Sp_2 are the single-test accuracies, C_pos and C_neg the conditional covariances, LR_neg_12 the joint ratio and LR_prod the product of the single-test ratios.

    Assumption: The covariances are plug-in estimates of the quantities in the joint probabilities of Wang, Lin and Nelson, with the reference standard taken as correct (HE-AS-DXA-001). Sampling uncertainty is not computed.

    Worked example (Illustrative study with dependence in both groups): Of 100 people with the condition, 5 are negative on the first test, 10 on the second and 3 on both; of 200 without it, 100, 160 and 90 (illustrative counts). The tests match those of the worked examples, the covariances are 0.025 and 0.05, and the joint ratio is about 0.0667, or 0.03 / 0.45, against a product of 0.0125. n_D = 100; n_N = 200; x_1D = 5; x_2D = 10; x_12D = 3; y_1N = 100; y_2N = 160; y_12N = 90; Se_1 = 0.95; Se_2 = 0.9; Sp_1 = 0.5; Sp_2 = 0.8; C_pos = 0.025; C_neg = 0.05; LR_neg_12 = 0.0667; LR_prod = 0.0125

    Worked example (Counts with no dependence): With 1,000 people in each group and both-negative counts of 5 and 400, equal to the products of the single-test rates, both covariances are 0 and the joint ratio equals the product, a limiting case. n_D = 1000; n_N = 1000; x_1D = 50; x_2D = 100; x_12D = 5; y_1N = 500; y_2N = 800; y_12N = 400; Se_1 = 0.95; Se_2 = 0.9; Sp_1 = 0.5; Sp_2 = 0.8; C_pos = 0; C_neg = 0; LR_neg_12 = 0.0125; LR_prod = 0.0125

    Excel: With the counts in CasesTotal, NonCasesTotal, CasesNegFirst, CasesNegSecond, CasesNegBoth, NonCasesNegFirst, NonCasesNegSecond and NonCasesNegBoth, =CasesNegBoth/CasesTotal-(CasesNegFirst/CasesTotal)*(CasesNegSecond/CasesTotal) returns CovCasesEst, =NonCasesNegBoth/NonCasesTotal-(NonCasesNegFirst/NonCasesTotal)*(NonCasesNegSecond/NonCasesTotal) returns CovNonCasesEst, =((CasesNegFirst/CasesTotal)*(CasesNegSecond/CasesTotal)+CovCasesEst)/((NonCasesNegFirst/NonCasesTotal)*(NonCasesNegSecond/NonCasesTotal)+CovNonCasesEst) returns JointNegLRCounts and =(CasesNegFirst/CasesTotal)/(NonCasesNegFirst/NonCasesTotal)*(CasesNegSecond/CasesTotal)/(NonCasesNegSecond/NonCasesTotal) returns ProductNegLR.

    R: joint_lr_neg <- function(n_D, n_N, x_1D, x_2D, x_12D, y_1N, y_2N, y_12N) { Se_1 <- 1-x_1D/n_D; Se_2 <- 1-x_2D/n_D; Sp_1 <- y_1N/n_N; Sp_2 <- y_2N/n_N; C_pos <- x_12D/n_D-(1-Se_1)*(1-Se_2); C_neg <- y_12N/n_N-Sp_1*Sp_2; c(C_pos = C_pos, C_neg = C_neg, LR_neg_12 = ((1-Se_1)*(1-Se_2)+C_pos)/(Sp_1*Sp_2+C_neg), LR_prod = (1-Se_1)/Sp_1*(1-Se_2)/Sp_2) } The call round(joint_lr_neg(100, 200, 5, 10, 3, 100, 160, 90), 4) returns 0.025, 0.05, 0.0667 and 0.0125.

    Python: def joint_lr_neg(n_D, n_N, x_1D, x_2D, x_12D, y_1N, y_2N, y_12N): Se_1 = 1-x_1D/n_D; Se_2 = 1-x_2D/n_D; Sp_1 = y_1N/n_N; Sp_2 = y_2N/n_N; C_pos = x_12D/n_D-(1-Se_1)*(1-Se_2); C_neg = y_12N/n_N-Sp_1*Sp_2; return C_pos, C_neg, ((1-Se_1)*(1-Se_2)+C_pos)/(Sp_1*Sp_2+C_neg), (1-Se_1)/Sp_1*(1-Se_2)/Sp_2 Plain Python with no imports; joint_lr_neg(100, 200, 5, 10, 3, 100, 160, 90) returns about 0.025, 0.05, 0.0667 and 0.0125.

    Test (Joint ratio equals the observed both-negative ratio): With the first worked example's counts JointNegLRCounts equals the both-negative proportion among people with the condition divided by that among people without it, 0.03 / 0.45. Expected result TRUE. FALSE shows the independence product returned in place of the joint ratio, 0.0125 against about 0.0667, or the implementation cell doubled. Excel check =ABS(JointNegLRCounts-(CasesNegBoth/CasesTotal)/(NonCasesNegBoth/NonCasesTotal))<1E-12

    Test (No dependence gives the product): With the second worked example's counts both covariance cells are 0 and JointNegLRCounts equals ProductNegLR. Expected result TRUE. FALSE shows the covariance computed with the sensitivities in place of the false negative rates, 0.005 minus 0.855, about minus 0.85, or the joint ratio cell doubled. Excel check =AND(ABS(CovCasesEst)<1E-12,ABS(CovNonCasesEst)<1E-12,ABS(JointNegLRCounts-ProductNegLR)<1E-12)

    Common error (Independence product used when covariances can be estimated): With the illustrative counts the joint ratio of about 0.0667 leaves a residual risk of about 2.78% at a 30% pre-test probability, above the article's 2.73% threshold, while the product of 0.0125 suggests about 0.53%, well below it.

    Source: Wang C, Lin X, Nelson KP. Bayesian hierarchical latent class models for estimating diagnostic accuracy. Statistical Methods in Medical Research. 2020;29(4):1112-1128, section 2.2 (joint probabilities of two tests with conditional covariances). Gardner IA, Stryhn H, Lind P, Collins MT. Preventive Veterinary Medicine. 2000;45(1-2):107-122, abstract (conditional covariances calculated as a measure of dependence between binary tests).

    Se_1 = 1 - x_1D / n_D; Se_2 = 1 - x_2D / n_D; Sp_1 = y_1N / n_N; Sp_2 = y_2N / n_N; C_pos = x_12D / n_D - (1 - Se_1) * (1 - Se_2); C_neg = y_12N / n_N - Sp_1 * Sp_2; LR_neg_12 = ((1 - Se_1) * (1 - Se_2) + C_pos) / (Sp_1 * Sp_2 + C_neg); LR_prod = (1 - Se_1) / Sp_1 * (1 - Se_2) / Sp_2

Try this function

Implementations

  • Excel

    Joint negative likelihood ratio of two tests from named accuracies and covariances

    With the two sensitivities in SensFirst and SensSecond, the two specificities in SpecFirst and SpecSecond and the covariances in CovCases and CovNonCases, the formulas return the combined sensitivity, specificity and negative likelihood ratio, held in SensParallel, SpecParallel and JointNegLR.

    =1-(1-SensFirst)*(1-SensSecond)-CovCases; =SpecFirst*SpecSecond+CovNonCases; =(1-SensParallel)/SpecParallel

Assumptions

  • Both tests read on every person under the either-positive rule

    Each person has both tests and the combined result is negative only when both are negative, the parallel interpretation of Gardner and colleagues. A pathway in which every person negative on the first test then has the second gives the same both-negative probabilities (derived).

  • Conditional covariances inside their valid limits

    C_pos and C_neg must keep every joint probability of the two results a valid probability. Wang, Lin and Nelson give the upper limits min(Se_1, Se_2) minus Se_1 Se_2 and min(Sp_1, Sp_2) minus Sp_1 Sp_2; at the upper limit of C_pos the more sensitive test is negative only when the other is too (derived).

  • Accuracy and covariances from people who had both tests

    Se_1, Se_2, Sp_1, Sp_2 and the covariances come from the same people tested with both tests against one reference standard, as in the cross-classification of HE-CF-NLR-001. Two separate accuracy studies give the single-test values but no covariance, and setting the covariances to zero is then an assumption, not an estimate.

Worked examples

  • Joint negative likelihood ratio of two conditionally independent tests

    The article's triage test, with sensitivity 0.95 and specificity 0.50, combined with an illustrative second test of sensitivity 0.90 and specificity 0.80 gives Se_par of 0.995 and Sp_par of 0.40, so LR_neg_12 is 0.005 / 0.40 = 0.0125, the product of the single-test ratios 0.10 and 0.125.

    Se_1 = 0.95; Se_2 = 0.9; Sp_1 = 0.5; Sp_2 = 0.8; C_pos = 0; C_neg = 0; Se_par = 0.995; Sp_par = 0.4; LR_neg_12 = 0.0125
  • Joint negative likelihood ratio with dependence among people with the condition

    With an illustrative covariance of 0.02 among people with the condition, inside its upper limit of 0.045, both tests miss 2.5% of cases instead of 0.5%, Se_par is 0.975 and LR_neg_12 is 0.025 / 0.40 = 0.0625, five times the product. At a 30% pre-test probability the residual risk is about 2.61% against about 0.53% under independence.

    Se_1 = 0.95; Se_2 = 0.9; Sp_1 = 0.5; Sp_2 = 0.8; C_pos = 0.02; C_neg = 0; Se_par = 0.975; Sp_par = 0.4; LR_neg_12 = 0.0625
  • Joint negative likelihood ratio with dependence in both groups

    Adding an illustrative covariance of 0.05 among people without the condition, inside its upper limit of 0.10, raises Sp_par to 0.45 and lowers LR_neg_12 to 0.025 / 0.45, about 0.0556, still about 4.4 times the product.

    Se_1 = 0.95; Se_2 = 0.9; Sp_1 = 0.5; Sp_2 = 0.8; C_pos = 0.02; C_neg = 0.05; Se_par = 0.975; Sp_par = 0.45; LR_neg_12 = 0.0556

Common errors

  • Multiplying the negative likelihood ratios of two dependent tests

    With the second worked example's covariance of 0.02 among people with the condition, multiplying 0.10 by 0.125 gives 0.0125 against a joint ratio of 0.0625. At a 30% pre-test probability the product suggests a residual risk of about 0.53% when it is about 2.61%, close to the article's 2.73% discharge threshold.

  • Using the both-negative ratio for a pathway that retests only positives

    If the second test is given only to people positive on the first and a person is discharged when either result is negative, the negative result is at least one negative, with ratio (1 minus Se_1 Se_2 minus C_pos) / (1 minus (1 minus Sp_1)(1 minus Sp_2) minus C_neg). For the independent worked example that is 0.145 / 0.90, about 0.161, against 0.0125 (derived from the joint probabilities of Wang, Lin and Nelson).

  • Setting the covariances to zero without data on both tests

    Taking each test's sensitivity and specificity from a different study leaves C_pos and C_neg unknown, and a zero then assumes conditional independence. Gardner and colleagues state that dependence between the sensitivities or specificities of two tests changes their accuracy in combination, so the assumption needs a scenario analysis with plausible covariances.

Sources

  • Wang, Lin and Nelson on joint probabilities of two tests with conditional covariances

    Wang C, Lin X, Nelson KP. Bayesian hierarchical latent class models for estimating diagnostic accuracy. Statistical Methods in Medical Research. 2020;29(4):1112-1128. doi:10.1177/0962280219852649. Section 2.2, Hierarchical conditional dependence model (Model M2), gives the joint probabilities of two binary tests given disease status with the conditional covariances C+ and C minus, including the probability that both are negative as (1 minus Se_j)(1 minus Se_k) + C+ given disease and Sp_j Sp_k + C minus given no disease, states that a positive value reflects positive dependence, and gives the limits on the covariances in constraint (3).

    View source →

  • Gardner and colleagues on conditional dependence and combined test accuracy

    Gardner IA, Stryhn H, Lind P, Collins MT. Conditional dependence between tests affects the diagnosis and surveillance of animal diseases. Preventive Veterinary Medicine. 2000;45(1-2):107-122. doi:10.1016/s0167-5877(00)00119-7. Abstract, which states that dependence between the sensitivities or specificities of pairs of tests affects their sensitivity and specificity when used in combination, that compared with conditional independence a positive dependence in sensitivity reduces the sensitivity of parallel interpretation and a positive dependence in specificity reduces the specificity of serial interpretation, and that conditional covariances are calculated as a measure of dependence between binary tests.

    View source →

Canonical Identity

Negative likelihood ratio of a negative result on both of two tests with conditional covariances | HealthEconomics.wiki