Beta Copula model
2026-04-28
Source:vignettes/nikoloulopoulosbivariate.Rmd
nikoloulopoulosbivariate.RmdThis vignette focuses on the copula-based mixed-effects model for bivariate meta-analysis of diagnostic test accuracy studies as presented by Nikoloulopoulos (2015). The goal of this approach is to jointly model sensitivity and specificity across studies while allowing flexible modeling of the dependence structure and marginal distributions of study-specific effects. Unlike standard bivariate models that assume a bivariate normal distribution for random effects, the copula-based formulation decouples the marginal distributions from their dependence, enabling more accurate representation of skewed or non-normal study-level variation.
Firstly, we introduce the model itself, explaining how the study-specific sensitivities and specificities are linked via a copula representation of the random effects distribution and how the marginal distributions capture between-study heterogeneity. We then describe how the dependence between sensitivity and specificity is modeled through a copula parameter, yielding a flexible joint distribution of study-level effects. These components can subsequently be used to construct the SROC curve and derive overall measures of diagnostic accuracy.
Afterwards, we focus on how the model can be fitted in practice, providing an overview of the steps involved in estimating the marginal parameters, the copula dependence parameter, and how these estimates can be used to obtain the SROC curve and summary measures of accuracy within a mixed-effects meta-analytic framework.
Model Specification
The copula mixed-effects model for bivariate meta-analysis as presented by Nikoloulopoulos (2015) jointly models study-specific sensitivities and specificities using a flexible random-effects distribution. Let \(Y_{i1}\) and \(Y_{i2}\) denote the number of true positives and true negatives in study \(i\), and let \(X_i = (X_{i1}, X_{i2})\) represent the latent study-specific sensitivity and specificity.
Within-study model
Conditional on \(X_i\), the observed counts are assumed to be independent and binomially distributed:
\[ Y_{i1} \mid X_{i1} \sim \text{Binomial}(n_{1i}, X_{i1}), \quad Y_{i2} \mid X_{i2} \sim \text{Binomial}(n_{0i}, X_{i2}), \]
where \(n_{1i}\) and \(n_{0i}\) are the numbers of diseased and non-diseased individuals in study \(i\), respectively. Unlike some other bivariate models, the latent sensitivities and specificities \(X_i\) can be modeled on the original scale, without transformation.
Marginals of the latent proportions
Each latent proportion \(X_{ij}\) is modeled using a Beta distribution:
\[ X_{ij} \sim \text{Beta}(\pi_j, \gamma_j), \quad j = 1,2, \]
where:
-
\(\pi_j\) is the mean of the latent
sensitivity (\(j=1\)) or specificity
(\(j=2\)), representing the
meta-analytic average,
- \(\gamma_j\) is a dispersion parameter capturing between-study variability.
This parametrization allows flexible modeling of study-to-study differences while keeping the proportion constrained to the interval [0,1].
Between-study dependence
The joint distribution of the latent pair \((X_{i1}, X_{i2})\) across studies is modeled using a parametric copula \(C(\cdot;\theta)\):
\[ F_{X_1,X_2}(x_1, x_2) = C(F_1(x_1;\pi_1,\gamma_1), \, F_2(x_2;\pi_2,\gamma_2); \theta), \]
where:
-
\(F_1\) and \(F_2\) are the Beta cumulative distribution
functions of \(X_{i1}\) and \(X_{i2}\),
- \(\theta\) is the copula dependence parameter, which captures the correlation or association between sensitivity and specificity across studies, including potential tail dependence.
Conceptually, the copula separates the marginal behavior (how variable are sensitivities or specificities individually) from the dependence structure (how sensitivity and specificity co-vary). This is especially useful if the joint distribution is skewed or not well approximated by a bivariate normal.
Joint likelihood
Combining the within-study binomial model and the copula-based between-study model gives the overall likelihood for all studies:
\[ L(\pi_1, \pi_2, \gamma_1, \gamma_2, \theta) = \prod_{i=1}^N \iint \Pr(Y_{i1} \mid X_{i1}) \, \Pr(Y_{i2} \mid X_{i2}) \, dF_{X_1,X_2}(x_1, x_2; \pi_1, \pi_2, \gamma_1, \gamma_2, \theta), \]
where the integral accounts for the latent random effects in each study.
-
\(\pi_1, \pi_2\) → meta-analytic
means of sensitivity and specificity
-
\(\gamma_1, \gamma_2\) →
between-study variability
- \(\theta\) → dependence between sensitivity and specificity
Parameter estimation
The parameters of the copula mixed-effects model, including the marginal means and dispersions \((\pi_1, \pi_2, \gamma_1, \gamma_2)\) and the copula dependence parameter \(\theta\), are estimated via maximum likelihood. The log-likelihood of the joint model is maximized numerically using a quasi-Newton method, which requires only the function values; gradients and the Hessian are computed numerically during the optimization. Standard errors of the estimates are obtained from the Hessian, and, under usual regularity conditions, the maximum likelihood estimates are approximately normal, allowing Wald-type inference.
Because the likelihood involves integration over the latent study-level sensitivities and specificities, it is evaluated numerically using Gauss–Legendre quadrature, which transforms independent uniform nodes into dependent uniform variables according to the copula. This approach is computationally efficient, accurate, and yields smooth derivatives needed for reliable convergence. In practice, a moderate number of quadrature points (e.g., 15) is sufficient to achieve stable estimates without excessive computation.
Model Application in MetaROC
Inside the package, the model can be fitted by either the
fit_metaROC() function or the
metaROC.metaROC() method when setting
action = "estimate". The model can then be fitted by
setting model = "nikoloulopoulos2015bivariate":
library(metaROC)
set.seed(7)
data(hba1c)
stm_hba1c <- hba1c[hba1c$originally_published == 1,]
fit_nik <- fit_metaROC(stm_hba1c, model = "nikoloulopoulos2015bivariate")## Hello and welcome to metaROC!
## Requested model: nikoloulopoulos2015bivariate
## This is a copula mixed model for bivariate meta-analysis.
## See https://doi.org/10.1002/sim.6595 for more details.
#est_nik <- metaROC(action ="estimate", data = stm_hba1c, model = "nikoloulopoulos2015bivariate")As we have already filtered the HbA1c dataset using the
originally_published column, we do not need to worry about
the warning, since we have only one entry per study.
Internally, the copula mixed-effects model for bivariate
meta-analysis (Nikoloulopoulos (2015)) is
fitted as described in the model specification section. The function
calls CopulaREMADA.beta() from the
CopulaREMADA R package, which implements the copula
mixed-effects model with Beta-distributed marginals.
Conceptually, CopulaREMADA.beta() estimates the marginal
distributions of sensitivity and specificity across studies, models the
dependence between them using a copula, and accounts for between-study
heterogeneity in both measures. The likelihood of the observed counts
for all studies is evaluated by integrating over the latent study-level
sensitivities and specificities. In other words, since we do not
directly observe the true sensitivity and specificity of each study, the
algorithm accounts for all possible values these latent parameters could
take, weighted by how likely they are under the Beta marginal
distributions and the copula dependence structure. By doing this, the
method finds the parameter values that maximize the probability of
observing the data we actually have, while properly incorporating both
between-study heterogeneity and the correlation between sensitivity and
specificity.
The returned object contains the fitted model, a convergence flag, the original data, and an identifier for the model type, which can be used to summarize diagnostic accuracy and construct the SROC curve.
summary(fit_nik, ci_type = "wald")##
## *** Results of Single threshold method (STM) ***
##
## Model: Copula model for single threshold
##
## Total number of studies: 38
## Total number of thresholds: 38
## Number of different thresholds: 13
##
## Results with Wald confidence intervals:
##
## Youden index (sensitivity weight = 0.5): 0.9046
## Estimated Sensitivity and Specificity [95% CI]:
## Sens: 0.7240 [0.7084; 0.7396]
## Spec: 0.7791 [0.7749; 0.7833]
##
## AUC: 0.8590
Firstly, the model name is returned, along with a reminder that the @Nikoloulopoulos (2015) copula mixed model is a single-threshold method. Afterwards, a basic overview of the meta-analysis is provided. The output then provides the largest Youden index, although, since the threshold itself is not included in the model, this does not provide additional interpretative insights.
Following the estimation of the model parameters, the summary reports the estimated sensitivity and specificity for the diagnostic test, along the corresponding 95% confidence intervals sensitivity and specificity. Finally, the AUC is displayed, providing a summary measure of the overall diagnostic accuracy.
## sensitivity specificity youden_index
## 1 0.1215277 0.9998971 -0.66910761
## 2 0.3575219 0.9896147 -0.22174696
## 3 0.4012088 0.9833561 -0.13936762
## 4 0.4297745 0.9780018 -0.08562835
## 5 0.4515997 0.9731377 -0.04464688
## 6 0.4695192 0.9685933 -0.01105421
## 7 0.4848619 0.9642775 0.01766529
## 8 0.4983649 0.9601346 0.04290676
## 9 0.5104827 0.9561273 0.06552994
## 10 0.5215167 0.9522292 0.08610461
The SROC for the @Nikoloulopoulos (2015) copula mixed model is constructed as illustrated in the model specification section.
Conceptually the SROC curve is constructed by using the estimated marginal distributions of sensitivity and specificity across studies to generate predicted values along a range of operating points. Sensitivity and specificity are paired for each point to form the ROC curve, and the Youden index is calculated. The AUC is then computed as a single summary measure of overall diagnostic performance.
Currently, the package does not support simulating data from this model, so this concludes the discussion of the @Nikoloulopoulos (2015) copula mixed model.
To gain an overview of how to plot a fitted model and how to conduct simulation studies, particularly for evaluating models such as the @Nikoloulopoulos (2015) copula mixed model, please refer to the other vignettes included in this package, which provide more detailed guidance on these topics.