What is diagnostic test accuracy network meta-analysis?
Diagnostic test accuracy network meta-analysis combines evidence on multiple diagnostic tests within a single statistical model. The evidence network may contain studies evaluating one test and comparative studies evaluating two or more tests.
Studies evaluating several tests provide information about differences between tests under a shared study context. Because results from different tests evaluated in the same study may be statistically dependent, the arm-based model proposed by Nyaga et al. links these test arms through shared study-level random effects and includes:
test-specific mean logit sensitivities and specificities;
correlated study-level random effects shared by all tests evaluated in the same study; and
additional arm-level random effects for individual study-test combinations.
Nyaga, V. N., Aerts, M., & Arbyn, M. (2018). ANOVA model for network meta-analysis of diagnostic test accuracy data. Statistical Methods in Medical Research, 27(6), 1766–1784.
How must the data be structured?
The input data must be in arm-based long format. Each row represents one diagnostic test evaluated in one study and contains a complete 2 × 2 table:
true positives (TP);
false positives (FP);
false negatives (FN); and
true negatives (TN).
A study evaluating several diagnostic tests therefore contributes several rows with the same study identifier.
Consider a study evaluating tests A, B, and C. The study contributes three rows:
Study
Test
TP
FP
FN
TN
Study 1
A
…
…
…
…
Study 1
B
…
…
…
…
Study 1
C
…
…
…
…
Each study-test combination must occur only once. Duplicate rows should be aggregated to one 2 × 2 table before fitting the model.
Which model does fitNyaga() fit?
For study i and diagnostic test k, let Seik and Spik denote sensitivity and specificity, respectively.
The sensitivity model is
logit (Seik) = μA, k + uA, i + δA, ik,
and the specificity model is
logit (Spik) = μB, k + uB, i + δB, ik.
The parameters
μA, k and μB, k
are the mean logit sensitivity and specificity of test k.
The study-level random effects are shared by all diagnostic tests evaluated in study i:
describe residual heterogeneity for individual study-test arms after accounting for the shared study effects.
The model fitted by fitNyaga() assumes
δA, ik ∼ 𝒩(0, τA2) and δB, ik ∼ 𝒩(0, τB2).
The arm-level sensitivity and specificity effects are assumed independent.
How are the observed data modelled?
For study-test arm ik, the diseased and non-diseased sample sizes are
n1, ik = TPik + FNik
and
n0, ik = TNik + FPik.
Conditional on the random effects,
TPik ∼ Binomial (n1, ik, Seik),
and
TNik ∼ Binomial (n0, ik, Spik).
The random effects are integrated from the likelihood using the Laplace approximation implemented in Template Model Builder.
How are summary sensitivity and specificity defined?
For test k, fitNyaga() reports the conditional summary sensitivity and specificity
Sek = logit−1(μA, k)
and
Spk = logit−1(μB, k).
These quantities represent the estimated accuracy of test k when the study-level and arm-level random effects equal zero.
Confidence intervals are first constructed on the logit scale:
μ̂A, k ± z1 − α/2SE(μ̂A, k)
and
μ̂B, k ± z1 − α/2SE(μ̂B, k),
and are subsequently transformed using the inverse-logit function.
This reporting convention is consistent with the Reitsma models in dtametaTMB.
How are contrasts between diagnostic tests reported?
The first level of the test factor is treated as the reference test.
For each non-reference test k, fitNyaga() reports the logit-scale contrasts
νA, k = μA, k − μA, 1 and νB, k = μB, k − μB, 1.
A positive value of νA, k indicates that test k has a higher mean logit sensitivity than the reference test. A positive value of νB, k indicates a higher mean logit specificity.
The covariance between the test-specific estimates is incorporated when calculating the standard errors of these contrasts.
The test factor should be releveled before fitting when a particular reference test is required.
Which additional summary measures are reported?
For each diagnostic test, fitNyaga() calculates:
Positive likelihood ratio
$$
LR_k^+
=
\frac{Se_k}{1-Sp_k}.
$$
Negative likelihood ratio
$$
LR_k^-
=
\frac{1-Se_k}{Sp_k}.
$$
Diagnostic odds ratio
$$
DOR_k
=
\frac{LR_k^+}{LR_k^-}.
$$
Because
logit (Sek) = μA, k
and
logit (Spk) = μB, k,
the log diagnostic odds ratio is
log (DORk) = μA, k + μB, k.
Confidence intervals for likelihood ratios and diagnostic odds ratios are constructed on the logarithmic scale using the delta method and the estimated covariance between μ̂A, k and μ̂B, k.
How is the total heterogeneity defined?
For a future study-test arm, the total latent sensitivity variance is
σA2 + τA2,
and the total latent specificity variance is
σB2 + τB2.
Because the arm-level sensitivity and specificity effects are independent, their covariance remains
σAB.
The total predictive covariance matrix is therefore
Two sensitivity estimates from different test arms in the same study share the study-level sensitivity effect uA, i. Their latent intra-study correlation is
Values close to one indicate that most heterogeneity is attributable to the shared study context. Values close to zero indicate that most heterogeneity occurs at the individual study-test-arm level.
How are confidence and prediction regions constructed?
For test k, the confidence region is based on the estimated covariance matrix of
Prediction regions therefore describe the estimated distribution of the true latent sensitivity and specificity of a future study-test arm rather than the distribution of future observed proportions.
The plotting method uses the finite-sample (F)-based contour convention employed by other plotting methods in dtametaTMB.
How are starting values obtained?
fitNyaga() obtains initial values from fitReitsmaSubgroupTMB() using the diagnostic test as a categorical subgroup variable and a common variance-covariance structure.
For initialization only, the subgroup heterogeneity variances are divided between the study-level and arm-level components.
The HPV dataset
The HPV dataset contains 36 study-test arms from 17 studies evaluating:
conventional cytology (CC);
Hybrid Capture 2 (HC2); and
liquid-based cytology (LBC).
Each row represents one observed study-test combination.
data("HPV")head(HPV)#> StudyID Year Age Location Test TP FP TN FN#> 1 Belinson JL 2003 2003 Age >30 Asia HC2 363 1652 6470 12#> 2 Belinson JL 2003 2003 Age >30 Asia LBC 331 1523 6599 44#> 3 Bigras G 2005 2005 Any age Europe HC2 80 1063 12697 2#> 4 Bigras G 2005 2005 Any age Europe LBC 48 445 13315 34#> 5 Cardenas-Turanzas M 2008 2008 Age >30 North America CC 7 52 767 9#> 6 Cardenas-Turanzas M 2008 2008 Age >30 North America HC2 11 55 764 5
How do I select the reference test?
The first factor level is used as the reference category for the reported νA and νB contrasts.
Changing the reference level changes the reported contrasts but does not change the fitted test-specific mean sensitivities and specificities or the maximized likelihood.
This component represents differences in study contexts that affect all diagnostic tests evaluated in the same study.
The arm-level variances
τA2 and τB2
represent residual variation between individual study-test arms.
The total heterogeneity of a future test arm is determined by
σA2 + τA2
for sensitivity and
σB2 + τB2
for specificity.
An arm-level variance may be estimated at or near zero. In such cases, Wald standard errors for that variance component and related quantities may be unreliable, although inference for test-specific fixed effects can remain usable.
How do I obtain a summary ROC plot?
plot(nyaga,size="se_revman",nudge_legend =-0.25)
How do I obtain a coupled forest plot?
forest(nyaga,order ="test")
Note: Rendering forest plots may take longer in an interactive R session due to the underlying grid graphics. Performance is typically faster when knitting the vignette (e.g. via RMarkdown or Quarto).
How can I constrain sensitivity across tests?
By default, fitNyaga() estimates separate mean logit sensitivities and specificities for every diagnostic test.
To fit a reduced model in which sensitivity is assumed equal across tests:
nyaga_common_sens <-fitNyaga(data = HPV,TP = TP,FP = FP,FN = FN,TN = TN,study = StudyID,test = Test,sensspec_constrain ="sens")nyaga_common_sens#> #> Nyaga NMA Model#> ---------------#> #> Number of studies : 17 #> Number of arms : 36 #> Number of tests : 3 #> Optimizer : Converged #> Hessian : Positive definite #> Max |grad| : 1.643869e-06 #> -2 log likelihood : 739.523 ( df = 9 )#> AIC : 757.523 #> BIC : 771.775 #> #> Use summary() for parameter estimates.
To assume equal specificity:
nyaga_common_spec <-fitNyaga(data = HPV,TP = TP,FP = FP,FN = FN,TN = TN,study = StudyID,test = Test,sensspec_constrain ="spec")nyaga_common_spec#> #> Nyaga NMA Model#> ---------------#> #> Number of studies : 17 #> Number of arms : 36 #> Number of tests : 3 #> Optimizer : Converged #> Hessian : Positive definite #> Max |grad| : 1.47195e-05 #> -2 log likelihood : 730.315 ( df = 9 )#> AIC : 748.315 #> BIC : 762.567 #> #> Use summary() for parameter estimates.
Both may be constrained simultaneously:
nyaga_common_both <-fitNyaga(data = HPV,TP = TP,FP = FP,FN = FN,TN = TN,study = StudyID,test = Test,sensspec_constrain =c("sens","spec"))nyaga_common_both#> #> Nyaga NMA Model#> ---------------#> #> Number of studies : 17 #> Number of arms : 36 #> Number of tests : 3 #> Optimizer : Converged #> Hessian : Positive definite #> Max |grad| : 1.759477e-05 #> -2 log likelihood : 754.738 ( df = 7 )#> AIC : 768.738 #> BIC : 779.822 #> #> Use summary() for parameter estimates.
How can I compare constrained models?
The constrained models are nested within the unrestricted model and can be compared using likelihood-ratio tests:
How does fitNyaga() differ from fitReitsmaSubgroup()?
fitReitsmaSubgroup()/fitReitsmaSubgroupTMB() can use diagnostic test as a categorical subgroup variable and estimate different mean sensitivities and specificities across tests.
However, a conventional subgroup model does not explicitly represent the dependence created when multiple tests are evaluated within the same study.
fitNyaga() introduces a shared study-level random effect:
which is common to all tests evaluated in study i. It also includes residual study-test-arm effects:
δA, ik and δB, ik.
The Nyaga model is therefore particularly relevant when the evidence contains a mixture of:
studies evaluating a single diagnostic test;
studies comparing two tests; and
studies evaluating several tests.
A Reitsma subgroup or meta-regression analysis remains useful as a conventional analysis of test differences, especially when each study contributes one primary test result. The models answer related but not identical questions.
What are the current model limitations?
The fitNyaga() implementation assumes:
one common unstructured study-level covariance matrix across tests;
separate but test-common arm-level sensitivity and specificity variances;
independent sensitivity and specificity arm-level deviations;
one 2 × 2 table per study-test combination; and
exchangeability of the study-level effects
The current implementation does not estimate:
test-specific study-level covariance matrices;
test-specific arm-level variances;
correlation between sensitivity and specificity arm-level effects;
additional categorical or continuous covariates;
network inconsistency parameters; or
latent-class extensions for an imperfect reference standard.
The model is based on aggregate 2 × 2 tables and does not distinguish between paired multi-test designs and studies in which separate participant groups receive different index tests. Shared study-level random effects represent dependence arising from a common study context, but the conditional binomial likelihood does not model within-person association between paired test results. A full paired-data likelihood would require joint cross-classifications of the index tests within disease strata, which cannot generally be reconstructed from their marginal 2 × 2 tables.
How was the implementation validated?
The TMB implementation was compared with the original Bayesian Stan implementation using the Nyaga demonstration data from https://github.com/VNyaga/NMADAS/tree/master/data. The test-specific logit means and study-level covariance estimates were closely comparable. Differences were concentrated in arm-level variance components, particularly where the maximum-likelihood estimate occurred near the boundary and the Bayesian prior retained a positive posterior distribution.
The HPV data were also fitted using the arm-based network model in Stata metadta. The test-specific logit sensitivity and specificity estimates and their standard errors were closely comparable with fitNyaga(). However, the Stata fit estimated the study-level correlation at the boundary of -1, and Stata reported that the required curvature condition for the maximized log likelihood was not satisfied.
References
Nyaga, V. N., Aerts, M., & Arbyn, M. (2018). ANOVA model for network meta-analysis of diagnostic test accuracy data. Statistical Methods in Medical Research, 27(6), 1766-1784.
Nyaga, V. N., & Arbyn, M. (2023). Comparison and validation of metadta for meta-analysis of diagnostic test accuracy studies. Research Synthesis Methods, 14(3), 544-562.
Reitsma, J. B., Glas, A. S., Rutjes, A. W. S., Scholten, R. J. P. M., Bossuyt, P. M., & Zwinderman, A. H. (2005). Bivariate analysis of sensitivity and specificity produces informative summary measures in diagnostic reviews. Journal of Clinical Epidemiology, 58(10), 982-990.