Version: | 1.7.5 |
Date: | 2025-05-27 |
Title: | Copula Mixed Models for Multivariate Meta-Analysis of Diagnostic Test Accuracy Studies |
Author: | Aristidis K. Nikoloulopoulos
|
Maintainer: | Aristidis K. Nikoloulopoulos <A.Nikoloulopoulos@uea.ac.uk> |
Depends: | R (≥ 3.5.0), statmod, matlab, tensor, mc2d |
Description: | The bivariate copula mixed model for meta-analysis of diagnostic test accuracy studies in Nikoloulopoulos (2015) <doi:10.1002/sim.6595> and Nikoloulopoulos (2018) <doi:10.1007/s10182-017-0299-y>. The vine copula mixed model for meta-analysis of diagnostic test accuracy studies accounting for disease prevalence in Nikoloulopoulos (2017) <doi:10.1177/0962280215596769> and also accounting for non-evaluable subjects in Nikoloulopoulos (2020) <doi:10.1515/ijb-2019-0107>. The hybrid vine copula mixed model for meta-analysis of diagnostic test accuracy case-control and cohort studies in Nikoloulopoulos (2018) <doi:10.1177/0962280216682376>. The D-vine copula mixed model for meta-analysis and comparison of two diagnostic tests in Nikoloulopoulos (2019) <doi:10.1177/0962280218796685>. The multinomial quadrivariate D-vine copula mixed model for meta-analysis of diagnostic tests with non-evaluable subjects in Nikoloulopoulos (2020) <doi:10.1177/0962280220913898>. The one-factor copula mixed model for joint meta-analysis of multiple diagnostic tests in Nikoloulopoulos (2022) <doi:10.1111/rssa.12838>. The multinomial six-variate 1-truncated D-vine copula mixed model for meta-analysis of two diagnostic tests accounting for within and between studies dependence in Nikoloulopoulos (2024) <doi:10.1177/09622802241269645>. The 1-truncated D-vine copula mixed models for meta-analysis of diagnostic accuracy studies without a gold standard (Nikoloulopoulos, 2025) <doi:10.1093/biomtc/ujaf037>. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
Packaged: | 2025-05-27 15:52:45 UTC; aris |
NeedsCompilation: | no |
Repository: | CRAN |
Date/Publication: | 2025-05-27 16:20:05 UTC |
Copula Mixed Models for Multivariate Meta-Analysis of Diagnostic Test Accuracy Studies
Description
Fits copula mixed models for multivariate meta-analysis of diagnostic test accuracy studies proposed in Nikoloulopoulos (2015, 2017, 2018a, 2018b, 2019, 2020a, 2020b, 2022, 2024, 2025).
Details
This package contains R functions to implement:
The copula mixed model for meta-analysis of diagnostic test accuracy studies and produce SROC curves and summary operating points (a pair of average sensitivity and specificity) with a confidence region and a predictive region (Nikoloulopoulos, 2015, 2018a). All the analyses presented in Section 7 of Nikoloulopoulos (2015) are given as code examples in the package;
The vine copula mixed model for meta-analysis of diagnostic test accuracy studies accounting for disease prevalence and non-evaluable subjects (Nikoloulopoulos, 2017, 2020a);
The hybrid vine copula mixed model for meta-analysis of diagnostic test accuracy case-control and cohort studies (Nikoloulopoulos, 2018b);
The D-vine copula mixed model for meta-analysis and comparison of two diagnostic tests (Nikoloulopoulos, 2019).
The multinomial quadrivariate D-vine copula mixed model for diagnostic studies meta-analysis accounting for non-evaluable subjects (Nikoloulopoulos, 2020b).
The one-factor copula mixed model for joint meta-analysis of multiple diagnostic tests (Nikoloulopoulos, 2022).
The multinomial six-variate D-vine copula mixed model for for meta-analysis of two diagnostic tests accounting for within and between studies dependence (Nikoloulopoulos, 2024).
The 1-truncated D-vine copula mixed model for for meta-analysis of diagnostic test accuracy studies without a gold standard (Nikoloulopoulos, 2025).
Author(s)
Aristidis K. Nikoloulopoulos.
References
Nikoloulopoulos, A.K. (2015) A mixed effect model for bivariate meta-analysis of diagnostic test accuracy studies using a copula representation of the random effects distribution. Statistics in Medicine, 34, 3842–3865. doi:10.1002/sim.6595.
Nikoloulopoulos, A.K. (2017) A vine copula mixed effect model for trivariate meta-analysis of diagnostic test accuracy studies accounting for disease prevalence. Statistical Methods in Medical Research, 26, 2270–2286. doi:10.1177/0962280215596769.
Nikoloulopoulos, A.K. (2018a) On composite likelihood in bivariate meta-analysis of diagnostic test accuracy studies. AStA Advances in Statistical Analysis, 102, 211–227. doi:10.1007/s10182-017-0299-y.
Nikoloulopoulos, A.K. (2018b) Hybrid copula mixed models for combining case-control and cohort studies in meta-analysis of diagnostic tests. Statistical Methods in Medical Research, 27, 2540–2553. doi:10.1177/0962280216682376.
Nikoloulopoulos, A.K. (2019) A D-vine copula mixed model for joint meta-analysis and comparison of diagnostic tests. Statistical Methods in Medical Research, 28(10-11):3286–3300. doi:10.1177/0962280218796685.
Nikoloulopoulos, A.K. (2020a) An extended trivariate vine copula mixed model for meta-analysis of diagnostic studies in the presence of non-evaluable outcomes. The International Journal of Biostatistics, 16(2). doi:10.1515/ijb-2019-0107.
Nikoloulopoulos, A.K. (2020b) A multinomial quadrivariate D-vine copula mixed model for diagnostic studies meta-analysis in the presence of non-evaluable subjects. Statistical Methods in Medical Research, 29(10), 2988–3005. doi:10.1177/0962280220913898.
Nikoloulopoulos, A.K. (2022) An one-factor copula mixed model for joint meta-analysis of multiple diagnostic tests. Journal of the Royal Statistical Society: Series A (Statistics in Society), 185(3), 1398–1423. doi:10.1111/rssa.12838.
Nikoloulopoulos, A.K. (2024) Joint meta-analysis of two diagnostic tests accounting for within and between studies dependence. Statistical Methods in Medical Research, 33(10), 1800–1817. doi:10.1177/09622802241269645.
Nikoloulopoulos, A.K. (2025) Vine copula mixed models for meta-analysis of diagnostic accuracy studies without a gold standard. Biometrics, 81(2), ujaf037. doi:10.1093/biomtc/ujaf037.
The computing tomography data
Description
Data on 17 studies of computed tomography (CT) for the diagnosis of lymph node metastasis in women with cervical cancer, one of three imaging techniques in the meta-analysis in Scheidler et al. (1997). Diagnosis of metastatic disease by CT relies on nodal enlargement.
Usage
data(CT)
Format
A data frame with 17 observations on the following 4 variables.
- TP
the number of true positives
- FN
the number of false negatives
- FP
the number of false positives
- TN
the number of true negatives
References
Scheidler, J., H. Hricak, K. K. Yu, L. Subak, and M. R. Segal. (1997) Radiological evaluation of lymph node metastases in patients with cervical cancer: A meta-analysis. Journal of the American Medical Association, 278, 1096–1101.
Maximum likelhood estimation for copula mixed models for diagnostic test accurracy studies
Description
For copula mixed models for diagnostic test accuracy studies numerical evaluation of the MLE is easily done with the following steps:
1. Calculate Gauss-Legendre quadrature points
gl$nodes
and weights gl$weights
.
2. Convert from independent uniform quadrature points to dependent uniform quadrature points that have distribution 'cop'.
The inverse of the conditional distribution qcondcop
corresponding to the copula 'cop' is used to achieve this.
3. Numerically evaluate the joint probability mass function with the bivariate integral in a double sum.
With Gauss-Legendre quadrature, the same nodes and weights
are used for different functions;
this helps in yielding smooth numerical derivatives for numerical optimization via quasi-Newton.
Our comparisons show that n_q=15
is adequate with good precision to at least at four decimal places.
Usage
CopulaREMADA.norm(TP,FN,FP,TN,gl,mgrid,qcond,tau2par)
CopulaREMADA.beta(TP,FN,FP,TN,gl,mgrid,qcond,tau2par)
countermonotonicCopulaREMADA.norm(TP,FN,FP,TN,gl,mgrid)
countermonotonicCopulaREMADA.beta(TP,FN,FP,TN,gl,mgrid)
Arguments
TP |
the number of true positives |
FN |
the number of false negatives |
FP |
the number of false positives |
TN |
the number of true negatives |
gl |
a list containing the components of Gauss-Legendre nodes |
mgrid |
a list containing two matrices with the rows of the output matrix x are copies of the vector |
qcond |
function for the inverse of conditional copula cdf |
tau2par |
function for maping Kendall's tau to copula parameter |
Value
A list containing the following components:
minimum |
the value of the estimated minimum of the negative log-likelihood |
estimate |
the MLE |
gradient |
the gradient at the estimated minimum of of the negative log-likelihood |
hessian |
the hessian at the estimated minimum of the negative log-likelihood |
code |
an integer indicating why the optimization process terminated |
iterations |
the number of iterations performed |
For more details see nlm
References
Nikoloulopoulos, A.K. (2015) A mixed effect model for bivariate meta-analysis of diagnostic test accuracy studies using a copula representation of the random effects distribution. Statistics in Medicine, 34, 3842–3865. doi:10.1002/sim.6595.
See Also
Examples
nq=15
gl=gauss.quad.prob(nq,"uniform")
mgrid<- meshgrid(gl$n,gl$n)
data(LAG)
attach(LAG)
c270est.b=CopulaREMADA.beta(TP,FN,FP,TN,gl,mgrid,qcondcln270,tau2par.cln270)
detach(LAG)
data(MRI)
attach(MRI)
c270est.n=CopulaREMADA.norm(TP,FN,FP,TN,gl,mgrid,qcondcln270,tau2par.cln270)
detach(MRI)
data(CT)
attach(CT)
est.n=countermonotonicCopulaREMADA.norm(TP,FN,FP,TN,gl,mgrid)
est.b=countermonotonicCopulaREMADA.beta(TP,FN,FP,TN,gl,mgrid)
detach(CT)
The down syndrome data
Description
Data on N=11
studies from the systematic review that examined the screening accuracy of shortened humerus and shortened femur of the fetus markers (two out of seven ultrasonographic markers or their combination in detecting Down syndrome in Smith-Bindman et al., 2001).
Format
A data frame with 11 observations on the following 8 variables.
- down_n_00
the number of the test results in the diseased where the shortened humerus outcome is negative and the shortened femur outcome is negative
- down_n_01
the number of the test results in the diseased where the shortened humerus outcome is negative and the shortened femur outcome is positive
- down_n_10
the number of the test results in the diseased where the shortened humerus outcome is positive and the shortened femur outcome is negative
- down_n_11
the number of the test results in the diseased where the shortened humerus outcome is positive and the shortened femur outcome is positive
- nodown_n_00
the number of the test results in the non-diseased where the shortened humerus outcome is negative and the shortened femur outcome is negative
- nodown_n_01
the number of the test results in the non-diseased where the shortened humerus outcome is negative and the shortened femur outcome is positive
- nodown_n_10
the number of the test results in the non-diseased where the shortened humerus outcome is positive and the shortened femur outcome is negative
- nodown_n_11
the number of the test results in the non-diseased where the shortened humerus outcome is positive and the shortened femur outcome is positive
References
Smith-Bindman R, Hosmer W, Feldstein V et al. Second-trimester ultrasound to detect fetuses with down syndrome: A meta-analysis (2001). Journal of the American Medical Association, 285(8): 1044-1055.
Maximum likelihood estimation of 1-factor copula mixed models for joint meta-analysis of T
diagnostic tests
Description
The estimated parameters can be obtained by using a quasi-Newton method applied to the logarithm of the joint likelihood. This numerical method requires only the objective function, i.e., the logarithm of the joint likelihood, while the gradients are computed numerically and the Hessian matrix of the second order derivatives is updated in each iteration. The standard errors (SE) of the ML estimates can be also obtained via the gradients and the Hessian computed numerically during the maximization process.
Usage
FactorCopulaREMADA.norm(TP,FN,FP,TN,gl,mgrid,qcond1,tau2par1,qcond2,tau2par2)
FactorCopulaREMADA.beta(TP,FN,FP,TN,gl,mgrid,qcond1,tau2par1,qcond2,tau2par2)
Arguments
TP |
an |
FN |
an |
FP |
an |
TN |
an |
gl |
a list containing the components of Gauss-Legendre nodes |
mgrid |
a list containing two matrices with the rows of the output matrix x are copies of the vector |
qcond1 |
function for the inverse conditional copula cdfs that link the factor with the latent sensitivities |
tau2par1 |
function for maping Kendall's tau to copula parameter at the copulas that link the factor with the latent sensitivities |
qcond2 |
function for the inverse conditional copula cdfs that link the factor with the latent specificities |
tau2par2 |
function for maping Kendall's tau to copula parameter at the copulas that link the factor with the latent specificities |
Value
A list containing the following components:
minimum |
the value of the estimated minimum of the negative log-likelihood |
estimate |
the MLE |
gradient |
the gradient at the estimated minimum of of the negative log-likelihood |
hessian |
the hessian at the estimated minimum of the negative log-likelihood |
code |
an integer indicating why the optimization process terminated |
iterations |
the number of iterations performed |
For more details see nlm
References
Nikoloulopoulos, A.K. (2022) An one-factor copula mixed model for joint meta-analysis of multiple diagnostic tests. Journal of the Royal Statistical Society: Series A (Statistics in Society), 185 (3), 1398–1423. doi:10.1111/rssa.12838.
Examples
data(arthritis)
attach(arthritis)
TP=cbind(TP1,TP2)
TN=cbind(TN1,TN2)
FP=cbind(FP1,FP2)
FN=cbind(FN1,FN2)
nq=25
gl=gauss.quad.prob(nq,"uniform")
mgrid=meshgrid(gl$n,gl$n)
qcond1=qcondcln
qcond2=qcondcln270
tau2par1=tau2par.cln
tau2par2=tau2par.cln270
out=FactorCopulaREMADA.norm(TP,FN,FP,TN,gl,mgrid,qcond1,tau2par1,qcond2,tau2par2)
se=sqrt(diag(solve(out$hessian)))
detach(arthritis)
The lymphangiography data
Description
Data on 17 studies of lymphangiography (LAG) for the diagnosis of lymph node metastasis in women with cervical cancer, one of three imaging techniques in the meta-analysis in Scheidler et al. (1997). Diagnosis of metastatic disease by LAG is based on the presence of nodal-filling defects.
Usage
data(LAG)
Format
A data frame with 17 observations on the following 4 variables.
- TP
the number of true positives
- FN
the number of false negatives
- FP
the number of false positives
- TN
the number of true negatives
References
Scheidler, J., H. Hricak, K. K. Yu, L. Subak, and M. R. Segal. (1997) Radiological evaluation of lymph node metastases in patients with cervical cancer: A meta-analysis. Journal of the American Medical Association, 278, 1096–1101.
The coronary CT angiography data in Menke and Kowalski (2016).
Description
Data on 30 studies from a systematic review for diagnostic accuracy studies of coronary computed tomography angiography for the detection of coronary artery disease.
Usage
data(MK2016)
Format
A data frame with 30 observations on the following 6 variables.
- TP
the number of true positives
- FN
the number of false negatives
- FP
the number of false positives
- TN
the number of true negatives
- NEP
the number of non-evaluable positives
- NEN
the number of non-evaluable negatives
References
Menke, J. and Kowalski, J. (2016). Diagnostic accuracy and utility of coronary ct angiography with consideration of unevaluable results: A systematic review and multivariate bayesian random-effects meta-analysis with intention to diagnose. European Radiology, 26(2):451–458.
The magnetic resonance imaging data
Description
Data on 10 studies of magnetic resonance imaging (MRI) for the diagnosis of lymph node metastasis in women with cervical cancer, the last imaging technique in the meta-analysis in Scheidler et al. (1997). Diagnosis of metastatic disease by MRI relies on nodal enlargement.
Usage
data(MRI)
Format
A data frame with 10 observations on the following 4 variables.
- TP
the number of true positives
- FN
the number of false negatives
- FP
the number of false positives
- TN
the number of true negatives
References
Scheidler, J., H. Hricak, K. K. Yu, L. Subak, and M. R. Segal. (1997) Radiological evaluation of lymph node metastases in patients with cervical cancer: A meta-analysis. Journal of the American Medical Association, 278, 1096–1101.
The orale glucose tolerance data
Description
Data on 10 studies of the oral glucose tolerance test for the diagnosis of diabetes mellitus in patients during acute coronary syndrome hospitalization in Ye et al. (2012).
Usage
data(OGT)
Format
A data frame with 10 observations on the following 4 variables.
- TP
the number of true positives
- FN
the number of false negatives
- FP
the number of false positives
- TN
the number of true negatives
References
Ye, Y., Xie, H., Zhao, X., Zhang, S. (2012) The oral glucose tolerance test for the diagnosis of diabetes mellitus in patients during acute coronary syndrome hospitalization: a meta-analysis of diagnostic test accuracy. Cardiovascular Diabetology, 11(5):155.
The Pap test data
Description
These data are comprised of N=59
studies that published between January 1984 and March 1992. The diagnostic accuracy of the Pap test (i.e., index test) is evaluated by comparing with the histology test (i.e., reference test), which is not a perfect test (Fahey, et al., 1995).
Format
A data frame with 59 observations on the following 4 variables.
- y11
the number of the test results where the Pap test outcome is positive and the histology test outcome is positive
- y10
the number of the test results where the Pap test outcome is positive and the histology test outcome is negative
- y01
the number of the test results where the Pap test outcome is negative and the histology test outcome is positive
- y00
the number of the test results where the Pap test outcome is negative and the histology test outcome is negative
References
Fahey, M. T., Irwig, L., and Macaskill, P. (1995). Meta-analysis of pap test accuracy. American Journal of Epidemiology, 142:680–689.
Summary receiver operating characteristic curves for copula mixed effect models for bivariate meta-analysis of diagnostic test accuracy studies
Description
Summary receiver operating characteristic (SROC) curves are demonstrated for the proposed models through quantile regression techniques and different characterizations of the estimated bivariate random effects distribution
Usage
SROC.norm(param,dcop,qcondcop,tau2par,TP,FN,FP,TN,
points=TRUE,curves=TRUE,
NEP=rep(0,length(TP)),NEN=rep(0,length(TP)))
SROC.beta(param,dcop,qcondcop,tau2par,TP,FN,FP,TN,
points=TRUE,curves=TRUE,
NEP=rep(0,length(TP)),NEN=rep(0,length(TP)))
SROC(param.beta,param.normal,TP,FN,FP,TN,
NEP=rep(0,length(TP)),NEN=rep(0,length(TP)))
Arguments
param |
A vector with the sensitivities, specifities, variabilities and Kendall's tau value (the latter only for |
param.beta |
A vector with the sensitivity, specifity and variabilities of the countermonotonic CopulaREMADA with beta margins |
param.normal |
A vector with the sensitivity, specifity and variabilities of the countermonotonic CopulaREMADA with normal margins |
dcop |
function for copula density |
qcondcop |
function for the inverse of conditional copula cdf |
tau2par |
function for maping Kendall's tau to copula parameter |
TP |
the number of true positives |
FN |
the number of false negatives |
FP |
the number of false positives |
TN |
the number of true negatives |
points |
logical: print individual studies |
curves |
logical: print quantile regression curves |
NEP |
the number of non-evaluable positives in the presence of non-evaluable subjects |
NEN |
the number of non-evaluable negatives in the presence of non-evaluable subjects |
Value
Summary receiver operating characteristic curves
References
Nikoloulopoulos, A.K. (2015) A mixed effect model for bivariate meta-analysis of diagnostic test accuracy studies using a copula representation of the random effects distribution. Statistics in Medicine, 34, 3842–3865. doi:10.1002/sim.6595.
See Also
Examples
nq=15
gl=gauss.quad.prob(nq,"uniform")
mgrid<- meshgrid(gl$n,gl$n)
data(telomerase)
attach(telomerase)
est.n=countermonotonicCopulaREMADA.norm(TP,FN,FP,TN,gl,mgrid)
est.b=countermonotonicCopulaREMADA.beta(TP,FN,FP,TN,gl,mgrid)
SROC(est.b$e,est.n$e,TP,FN,FP,TN)
detach(telomerase)
data(LAG)
attach(LAG)
c180est.b=CopulaREMADA.beta(TP,FN,FP,TN,gl,mgrid,qcondcln180,tau2par.cln180)
SROC.beta(c180est.b$e,dcln180,qcondcln180,tau2par.cln180,TP,FN,FP,TN)
detach(LAG)
data(MRI)
attach(MRI)
c270est.n=CopulaREMADA.norm(TP,FN,FP,TN,gl,mgrid,qcondcln270,tau2par.cln270)
SROC.norm(c270est.n$e,dcln270,qcondcln270,tau2par.cln270,TP,FN,FP,TN)
detach(MRI)
data(MK2016)
attach(MK2016)
p=c(0.898745016,0.766105342,0.059168715,0.109217888)
g=c(0.090270947,0.079469009,0.367463579,0.154976269)
taus=c(0.82050793,-0.51867629,0.26457961)
SROC.beta(c(p[1:2],g[1:2],taus[1]),
dcln180,qcondcln180,tau2par.cln180,
TP,FN,FP,TN,points=TRUE,curves=TRUE,NEP,NEN)
detach(MK2016)
Maximum likelhood estimation for (truncated) vine copula mixed models for diagnostic test accurracy studies accounting for disease prevalence and non-evaluable outcomes
Description
The estimated parameters can be obtained by using a quasi-Newton method applied to the logarithm of the joint likelihood. This numerical method requires only the objective function, i.e., the logarithm of the joint likelihood, while the gradients are computed numerically and the Hessian matrix of the second order derivatives is updated in each iteration. The standard errors (SE) of the ML estimates can be also obtained via the gradients and the Hessian computed numerically during the maximization process.
Usage
VineCopulaREMADA.norm(TP,FN,FP,TN,gl,mgrid,
qcondcop12,qcondcop13,qcondcop23,
tau2par12,tau2par13,tau2par23,
NEP,NEN)
VineCopulaREMADA.beta(TP,FN,FP,TN,gl,mgrid,
qcondcop12,qcondcop13,qcondcop23,
tau2par12,tau2par13,tau2par23,
NEP,NEN)
tVineCopulaREMADA.norm(TP,FN,FP,TN,gl,mgrid,
qcondcop12,qcondcop13,
tau2par12,tau2par13,
NEP,NEN)
tVineCopulaREMADA.beta(TP,FN,FP,TN,gl,mgrid,
qcondcop12,qcondcop13,
tau2par12,tau2par13,
NEP,NEN)
Arguments
TP |
the number of true positives |
FN |
the number of false negatives |
FP |
the number of false positives |
TN |
the number of true negatives |
gl |
a list containing the components of Gauss-Legendre nodes |
mgrid |
a list containing three-dimensional arrays. Replicates of the quadrature points that produce a 3-dimensional full grid |
qcondcop12 |
function for the inverse of conditional copula cdf at the (1,2) bivariate margin |
qcondcop13 |
function for the inverse of conditional copula cdf at the (1,3) bivariate margin |
qcondcop23 |
function for the inverse of conditional copula cdf at the (2,3|1) bivariate margin |
tau2par12 |
function for maping Kendall's tau at the (1,2) bivariate margin to copula parameter |
tau2par13 |
function for maping Kendall's tau at the (1,3) bivariate margin to copula parameter |
tau2par23 |
function for maping Kendall's tau at the (2,3|1) bivariate margin to the conditional copula parameter |
NEP |
the number of non-evaluable positives in the presence of non-evaluable subjects |
NEN |
the number of non-evaluable negatives in the presence of non-evaluable subjects |
Value
A list containing the following components:
minimum |
the value of the estimated minimum of the negative log-likelihood |
estimate |
the MLE |
gradient |
the gradient at the estimated minimum of of the negative log-likelihood |
hessian |
the hessian at the estimated minimum of the negative log-likelihood |
code |
an integer indicating why the optimization process terminated |
iterations |
the number of iterations performed |
For more details see nlm
References
Nikoloulopoulos, A.K. (2017) A vine copula mixed effect model for trivariate meta-analysis of diagnostic test accuracy studies accounting for disease prevalence. Statistical Methods in Medical Research, 26, 2270–2286. doi:10.1177/0962280215596769.
Nikoloulopoulos, A.K. (2020) An extended trivariate vine copula mixed model for meta-analysis of diagnostic studies in the presence of non-evaluable outcomes. The International Journal of Biostatistics, 16(2). doi:10.1515/ijb-2019-0107.
See Also
Examples
nq=15
gl=gauss.quad.prob(nq,"uniform")
mgrid=meshgrid(gl$n,gl$n,gl$n,nargout=3)
data(OGT)
attach(OGT)
out=tVineCopulaREMADA.norm(TP,FN,FP,TN,gl,mgrid,
qcondbvn,qcondbvn,tau2par.bvn,tau2par.bvn)
detach(OGT)
############################################
# In the precence of non-evaluable results #
data(coronary)
attach(coronary)
out=tVineCopulaREMADA.norm(TP,FN,FP,TN,gl,mgrid,
qcondbvn,qcondbvn,tau2par.bvn,tau2par.bvn,NEP,NEN)
detach(coronary)
The rheumatoid arthritis data
Description
Data obtained from a meta-analysis that aimed to determine whether anti-cyclic citrullinated peptide (anti-CCP) antibody identifies more accurately patients with rheumatoid arthritis than rheumatoid factor (RF) does. We include N=22
studies that assessed both RF and anti-CCP2 antibody for diagnosing rheumatoid arthritis.
Format
A data frame with 22 observations on the following 8 variables.
- TP1
the number of true positives for RF
- FN1
the number of false negatives for RF
- FP1
the number of false positives for RF
- TN1
the number of true negatives for RF
- TP2
the number of true positives for anti-CCP2
- FN2
the number of false negatives for anti-CCP2
- FP2
the number of false positives for anti-CCP2
- TN2
the number of true negatives for anti-CCP2
References
Nishimura, K., Sugiyama, D., Kogata, Y., et al. (2007) Meta-analysis: Diagnostic accuracy of anti-cyclic citrullinated peptide antibody and rheumatoid factor for rheumatoid arthritis. Annals of Internal Medicine, 146(11), 797–808.
Dimou, N.L., Adam, M. and Bagos, P.G. (2016) A multivariate method for meta-analysis and comparison of diagnostic tests. Statistics in Medicine, 35(20), 3509–3523.
The beta-D-Glucan-data
Description
Data on 8 cohort studies inthemeta-analysis in Karageorgopoulos et al. (2011). The interest there is to assess beta
-D-Glucan as aserum or plasma marker for the presence of invasive fungal infections.
Usage
data(betaDG)
Format
A data frame with 8 observations on the following 4 variables.
- TP
the number of true positives
- FN
the number of false negatives
- FP
the number of false positives
- TN
the number of true negatives
References
Karageorgopoulos, D.E., Vouloumanou, E.K., Ntziora, F., et al.
(2011) beta
-D-Glucan assay for the diagnosis of invasive fungal infections: a meta-analysis. Clinical Infectious Diseases, 52(6), 750–770.
The coronary CT angiography data
Description
Data on 26 studies from a systematic review for diagnostic accuracy studies of coronary computed tomography angiography for the detection of coronary artery disease.
Usage
data(coronary)
Format
A data frame with 26 observations on the following 6 variables.
- TP
the number of true positives
- FN
the number of false negatives
- FP
the number of false positives
- TN
the number of true negatives
- NEP
the number of non-evaluable positives
- NEN
the number of non-evaluable negatives
References
Schuetz, G. M., Schlattmann, P., and Dewey, M. (2012). Use of 3x2 tables with an intention to diagnose approach to assess clinical performance of diagnostic tests: Meta-analytical evaluation of coronary CT angiography studies. BMJ (Online), 345:e6717.
Simulation from a trivariate C-vine copula
Description
Simulation from a trivariate C-vine copula
Usage
cvinesim(N,param,qcondcop12,qcondcop13,qcondcop23,
tau2par12,tau2par13,tau2par23)
Arguments
N |
sample size |
param |
Kendall's tau values for margins (1,2), (1,3), (23|1) |
qcondcop12 |
function for the inverse of conditional copula cdf at the (1,2) bivariate margin |
qcondcop13 |
function for the inverse of conditional copula cdf at the (1,3) bivariate margin |
qcondcop23 |
function for the inverse of conditional copula cdf at the (2,3|1) bivariate margin |
tau2par12 |
function for maping Kendall's tau at the (1,2) bivariate margin to copula parameter |
tau2par13 |
function for maping Kendall's tau at the (1,3) bivariate margin to copula parameter |
tau2par23 |
function for maping Kendall's tau at the (2,3|1) bivariate margin to the conditional copula parameter |
Details
Choices are 'cop' in rcop are bvn, frk, cln, cln90 (rotated by 90 degrees cln), cln180 (rotated by 180 degrees cln), cln270 (rotated by 270 degrees cln).
See help page for dcop
for the abbreviations of the copula names.
Value
Nx3 matrix with values in (0,1)
References
Joe H (2011) Dependence comparisons of vine copulae with four or more variables. In: Kurowicka D, Joe H, editors. Dependence Modeling: Handbook on Vine Copulae. Singapore: World Scientific; 2011. p. 139–164
Joe H (2014) Dependence Modeling with Copulas. Chapman & Hall/CRC.
Joe H (2014) CopulaModel: Dependence Modeling with Copulas. Software for book: Dependence Modeling with Copulas, Chapman & Hall/CRC, 2014.
See Also
Bivariate copula densities
Description
Bivariate copula densities for parametric families.
Usage
dbvn(u,v,cpar)
dfrk(u,v,cpar)
dcln(u,v,cpar)
dcln90(u,v,cpar)
dcln270(u,v,cpar)
Arguments
u |
value in interval 0,1; could be a vector |
v |
value in interval 0,1; could be a vector |
cpar |
copula parameter: scalar. |
Details
Choices are 'cop' in dcop are bvn, frk, cln, cln90 (rotated by 90 degrees cln), cln180 (rotated by 180 degrees cln), cln270 (rotated by 270 degrees cln).
The copula names are abbreviations for:
bvn = bivariate normal or Gaussian
frk = Frank
cln = Clayton or Mardia-Takahasi-Cook-Johnson
Value
pdf value(s).
References
Joe H (1997) Multivariate Models and Dependence Concepts. Chapman & Hall
Joe H (2014) Dependence Modeling with Copulas. Chapman & Hall/CRC.
Joe H (2014) CopulaModel: Dependence Modeling with Copulas. Software for book: Dependence Modeling with Copulas, Chapman & Hall/CRC, 2014.
See Also
Simulation from a six-variate 1-truncated D-vine copula
Description
Simulation from a six-variate 1-truncated D-vine copula.
Usage
dvine6dsim(nsim,tau,qcond,tau2par)
Arguments
nsim |
sample size |
tau |
Kendall's tau values |
qcond |
function for the inverse conditional copula cdf |
tau2par |
function for maping Kendall's taus to copula parameters |
Details
Choices are 'cop' in rcop are bvn, frk, cln, cln90 (rotated by 90 degrees cln), cln180 (rotated by 180 degrees cln), cln270 (rotated by 270 degrees cln).
See help page for qcondcop
for the abbreviations of the copula names.
Value
Nx6 matrix with values in (0,1)
References
Joe H (2011) Dependence comparisons of vine copulae with four or more variables. In: Kurowicka D, Joe H, editors. Dependence Modeling: Handbook on Vine Copulae. Singapore: World Scientific; 2011. p. 139–164
Joe H (2014) Dependence Modeling with Copulas. Chapman & Hall/CRC.
Joe H (2014) CopulaModel: Dependence Modeling with Copulas. Software for book: Dependence Modeling with Copulas, Chapman & Hall/CRC, 2014.
Nikoloulopoulos, A.K. (2024) Joint meta-analysis of two diagnostic tests accounting for within and between studies dependence. Statistical Methods in Medical Research, 33(10), 1800–1817. doi:10.1177/09622802241269645.
See Also
Simulation from a (truncated) quadrivariate D-vine copula
Description
Simulation from a (truncated) quadrivariate D-vine copula. Lower-order trees (if any) are composed with BVN copulas.
Usage
dvinesim(nsim,param,qcond1,pcond1,tau2par1,qcond2,pcond2,tau2par2)
dtrvinesim(nsim,trparam,qcond1,pcond1,tau2par1,qcond2,pcond2,tau2par2)
Arguments
nsim |
sample size |
param |
Kendall's tau values for margins (1,2), (2,3), (3,4), (1,3|2), (2,4|3), (1,4|23) |
trparam |
Kendall's tau values for margins (1,2), (2,3), (3,4) |
qcond1 |
function for the inverse conditional copula cdf at the (1,2) and (3,4) bivariate margins |
pcond1 |
function for the conditional copula cdf at the (1,2) and and (3,4) bivariate margins |
tau2par1 |
function for maping Kendall's tau at the (1,2) and (3,4) bivariate margins to copula parameter |
qcond2 |
function for the inverse conditional copula cdf at the (2,3) bivariate margin |
pcond2 |
function for the conditional copula cdf at the (2,3) bivariate margin |
tau2par2 |
function for maping Kendall's tau at the (2,3) bivariate margin to copula parameter |
Details
Choices are 'cop' in rcop are bvn, frk, cln, cln90 (rotated by 90 degrees cln), cln180 (rotated by 180 degrees cln), cln270 (rotated by 270 degrees cln).
See help page for dcop
for the abbreviations of the copula names.
Value
Nx4 matrix with values in (0,1)
References
Joe H (2011) Dependence comparisons of vine copulae with four or more variables. In: Kurowicka D, Joe H, editors. Dependence Modeling: Handbook on Vine Copulae. Singapore: World Scientific; 2011. p. 139–164
Joe H (2014) Dependence Modeling with Copulas. Chapman & Hall/CRC.
Joe H (2014) CopulaModel: Dependence Modeling with Copulas. Software for book: Dependence Modeling with Copulas, Chapman & Hall/CRC, 2014.
Nikoloulopoulos, A.K. (2018) A D-vine copula mixed model for joint meta-analysis and comparison of diagnostic tests. Statistical Methods in Medical Research, in press. doi:10.1177/0962280218796685.
Nikoloulopoulos, A.K. (2018) A multinomial quadrivariate D-vine copula mixed model for diagnostic studies meta-analysis accounting for non-evaluable subjects. ArXiv e-prints, arXiv:1812.05915. https://arxiv.org/abs/1812.05915.
See Also
Maximum likelhood estimation for hybrid copula mixed models for combining case-control and cohort studies in meta-analysis of diagnostic tests
Description
The estimated parameters can be obtained by using a quasi-Newton method applied to the logarithm of the joint likelihood. This numerical method requires only the objective function, i.e., the logarithm of the joint likelihood, while the gradients are computed numerically and the Hessian matrix of the second order derivatives is updated in each iteration. The standard errors (SE) of the ML estimates can be also obtained via the gradients and the Hessian computed numerically during the maximization process.
Usage
hybridCopulaREMADA.norm(TP,FN,FP,TN,type,gl,mgrid1,mgrid2,
qcondcop12,qcondcop13,
tau2par12,tau2par13,qcond,tau2par)
hybridCopulaREMADA.beta(TP,FN,FP,TN,type,gl,mgrid1,mgrid2,
qcondcop12,qcondcop13,
tau2par12,tau2par13,qcond,tau2par)
Arguments
TP |
the number of true positives |
FN |
the number of false negatives |
FP |
the number of false positives |
TN |
the number of true negatives |
type |
a scalar indicating the study type: 1: Cohort study; 2: Case-control study. |
gl |
a list containing the components of Gauss-Legendre nodes |
mgrid1 |
a list containing three-dimensional arrays |
mgrid2 |
a list containing two matrices with the rows of the output matrix x are copies of the vector |
qcondcop12 |
function for the inverse of conditional copula cdf at the (1,2) bivariate margin of the vine |
qcondcop13 |
function for the inverse of conditional copula cdf at the (1,3) bivariate margin of the vine |
tau2par12 |
function for maping Kendall's tau at the (1,2) bivariate margin of the vine to copula parameter |
tau2par13 |
function for maping Kendall's tau at the (1,3) bivariate margin of the vine to copula parameter |
qcond |
function for the inverse of conditional copula cdf |
tau2par |
function for maping Kendall's tau to the bivariate copula parameter |
Value
A list containing the following components:
minimum |
the value of the estimated minimum of the negative log-likelihood |
estimate |
the MLE |
gradient |
the gradient at the estimated minimum of of the negative log-likelihood |
hessian |
the hessian at the estimated minimum of the negative log-likelihood |
code |
an integer indicating why the optimization process terminated |
iterations |
the number of iterations performed |
For more details see nlm
References
Nikoloulopoulos, A.K. (2018) Hybrid copula mixed models for combining case-control and cohort studies in meta-analysis of diagnostic tests. Statistical Methods in Medical Research, 27, 2540–2553. doi:10.1177/0962280216682376.
See Also
VineCopulaREMADA
, CopulaREMADA
Examples
# simulate the data from N=25 cohort studies
N=25
p=c(0.8,0.7,0.4)
g=c(0.1,0.1,0.05)
taus=c(-0.5,-0.3,-0.0001)
qcondcop12=qcondcop23=qcondcop13=qcondcln90
tau2par12=tau2par23=tau2par13=tau2par.cln90
simdat1=rVineCopulaREMADA.beta(N,p,g,taus,0,0,
qcondcop12,qcondcop13,qcondcop23,tau2par12,tau2par13,tau2par23)
# simulate data from the N=25 case-control studies
tau=0.5
p=p[-3]
g=g[-3]
simdat2=rCopulaREMADA.beta(N,p,g,tau,rcln,tau2par.cln)
# combine the data
TP=c(simdat1$TP,simdat2$TP)
TN=c(simdat1$TN,simdat2$TN)
FP=c(simdat1$FP,simdat2$FP)
FN=c(simdat1$FN,simdat2$FN)
type=rep(c(1,2),each=N)
# fit the hybrid copula mixed model
nq=21
gl=gauss.quad.prob(nq,"uniform")
mgrid1<- meshgrid(gl$n,gl$n,gl$n,nargout=3)
mgrid2<- meshgrid(gl$n,gl$n)
qcond=qcondcln
tau2par=tau2par.cln
est=hybridCopulaREMADA.beta(TP,FN,FP,TN,type,gl,mgrid1,mgrid2,
qcondcop12,qcondcop13,tau2par12,tau2par13,qcond,tau2par)
Maximum likelihood estimation of 5-variate 1-truncated D-vine copula mixed models for meta-analysis of diagnostic accuracy studies without a gold standard
Description
The estimated parameters can be obtained by using a quasi-Newton method applied to the logarithm of the joint likelihood. This numerical method requires only the objective function, i.e., the logarithm of the joint likelihood, while the gradients are computed numerically and the Hessian matrix of the second order derivatives is updated in each iteration. The standard errors (SE) of the ML estimates can be also obtained via the gradients and the Hessian computed numerically during the maximization process.
Usage
imperfect.fivevariateVineCopulaREMADA.norm.comprehensive(y11,y10,y01,y00,
gl,mgrid,qcond,tau2par,start)
imperfect.fivevariateVineCopulaREMADA.beta.comprehensive(y11,y10,y01,y00,
gl,mgrid,qcond,tau2par,start)
Arguments
y11 |
the number of the test results where the index test outcome is positive and the reference test outcome is positive |
y10 |
the number of the test results where the index test outcome is positive and the reference test outcome is negative |
y01 |
the number of the test results where the index test outcome is negative and the reference test outcome is positive |
y00 |
the number of the test results where the index test outcome is negative and the reference test outcome is negative |
gl |
a list containing the components of Gauss-Legendre nodes |
mgrid |
a list containing five-dimensional arrays. Replicates of the quadrature points that produce a 5-dimensional full grid |
qcond |
function for the inverse of conditional copula cdf; choices are |
tau2par |
function for maping Kendall's tau to copula parameter; choices are |
start |
starting values for the parameters |
Value
A list containing the following components:
LogLikelihood |
the maximized log-likelihood |
Estimates |
the MLE |
SE |
the standard errors |
References
Nikoloulopoulos, A.K. (2025) Vine copula mixed models for meta-analysis of diagnostic accuracy studies without a gold standard. Biometrics, 81(2), ujaf037. doi:10.1093/biomtc/ujaf037.
Examples
data(Pap)
attach(Pap)
nq=15
gl=gauss.quad.prob(nq,"uniform")
data(mgrid5d15)
mgrid=mgrid5d15
tau2par=tau2par.bvn
qcond=qcondbvn
start=c(rep(0.6,5),rep(0.5,5),rep(0.01,4))
est.norm=imperfect.fivevariateVineCopulaREMADA.norm.comprehensive(y11,y10,y01,
y00,gl,mgrid,qcond,tau2par,start)
detach(Pap)
Maximum likelihood estimation of quadrivariate 1-truncated D-vine copula mixed models for meta-analysis of diagnostic accuracy studies without a gold standard
Description
The estimated parameters can be obtained by using a quasi-Newton method applied to the logarithm of the joint likelihood. This numerical method requires only the objective function, i.e., the logarithm of the joint likelihood, while the gradients are computed numerically and the Hessian matrix of the second order derivatives is updated in each iteration. The standard errors (SE) of the ML estimates can be also obtained via the gradients and the Hessian computed numerically during the maximization process.
Usage
imperfect.quadrivariateVineCopulaREMADA.norm.comprehensive(y11,y10,y01,y00,
gl,mgrid,qcond,tau2par,select.random,start)
imperfect.quadrivariateVineCopulaREMADA.beta.comprehensive(y11,y10,y01,y00,
gl,mgrid,qcond,tau2par,select.random,start)
Arguments
y11 |
the number of the test results where the index test outcome is positive and the reference test outcome is positive |
y10 |
the number of the test results where the index test outcome is positive and the reference test outcome is negative |
y01 |
the number of the test results where the index test outcome is negative and the reference test outcome is positive |
y00 |
the number of the test results where the index test outcome is negative and the reference test outcome is negative |
gl |
a list containing the components of Gauss-Legendre nodes |
select.random |
vector |
mgrid |
a list containing four-dimensional arrays. Replicates of the quadrature points that produce a 4-dimensional full grid |
qcond |
function for the inverse of conditional copula cdf; choices are |
tau2par |
function for maping Kendall's tau to copula parameter; choices are |
start |
starting values for the parameters |
Value
A list containing the following components:
LogLikelihood |
the maximized log-likelihood |
Estimates |
the MLE |
SE |
the standard errors |
References
Nikoloulopoulos, A.K. (2025) Vine copula mixed models for meta-analysis of diagnostic accuracy studies without a gold standard. Biometrics, 81(2), ujaf037. doi:10.1093/biomtc/ujaf037.
Examples
data(Pap)
attach(Pap)
nq=30
gl=gauss.quad.prob(nq,"uniform")
data(mgrid30)
mgrid=mgrid30
tau2par=tau2par.bvn
qcond=qcondbvn
select.random=1:4
start=c(rep(0.6,5),rep(0.5,4),c(0.1,-0.1,0.1))
est.norm=imperfect.quadrivariateVineCopulaREMADA.norm.comprehensive(y11,y10,y01,
y00,gl,mgrid,qcond,tau2par,select.random,start)
detach(Pap)
Maximum likelihood estimation of trivariate 1-truncated D-vine copula mixed models for meta-analysis of diagnostic accuracy studies without a gold standard
Description
The estimated parameters can be obtained by using a quasi-Newton method applied to the logarithm of the joint likelihood. This numerical method requires only the objective function, i.e., the logarithm of the joint likelihood, while the gradients are computed numerically and the Hessian matrix of the second order derivatives is updated in each iteration. The standard errors (SE) of the ML estimates can be also obtained via the gradients and the Hessian computed numerically during the maximization process.
Usage
imperfect.trivariateVineCopulaREMADA.norm.comprehensive(y11,
y10,y01,y00,gl,mgrid,qcond,tau2par,select.random,start)
imperfect.trivariateVineCopulaREMADA.norm(y11,
y10,y01,y00,gl,mgrid,qcond1,tau2par1,qcond2,tau2par2,select.random,start)
imperfect.trivariateVineCopulaREMADA.beta.comprehensive(y11,
y10,y01,y00,gl,mgrid,qcond,tau2par,select.random,start)
imperfect.trivariateVineCopulaREMADA.beta(y11,
y10,y01,y00,gl,mgrid,qcond1,tau2par1,qcond2,tau2par2,select.random,start)
Arguments
y11 |
the number of the test results where the index test outcome is positive and the reference test outcome is positive |
y10 |
the number of the test results where the index test outcome is positive and the reference test outcome is negative |
y01 |
the number of the test results where the index test outcome is negative and the reference test outcome is positive |
y00 |
the number of the test results where the index test outcome is negative and the reference test outcome is negative |
gl |
a list containing the components of Gauss-Legendre nodes |
mgrid |
a list containing three-dimensional arrays. Replicates of the quadrature points that produce a 3-dimensional full grid |
select.random |
vector |
qcond |
function for the inverse of conditional copula cdf; choices are |
tau2par |
function for maping Kendall's tau to copula parameter; choices are |
qcond1 |
function for the inverse of conditional copula cdf for the |
tau2par1 |
function for maping Kendall's tau to copula parameter for the |
qcond2 |
function for the inverse of conditional copula cdf for the |
tau2par2 |
function for maping Kendall's tau to copula parameter for the |
start |
starting values for the parameters |
Value
A list containing the following components:
LogLikelihood |
the maximized log-likelihood |
Estimates |
the MLE |
SE |
the standard errors |
References
Nikoloulopoulos, A.K. (2025) Vine copula mixed models for meta-analysis of diagnostic accuracy studies without a gold standard. Biometrics, 81(2), ujaf037. doi:10.1093/biomtc/ujaf037.
Examples
data(Pap)
attach(Pap)
nq=30
gl=gauss.quad.prob(nq,"uniform")
mgrid<- meshgrid(gl$n,gl$n,gl$n,nargout=3)
tau2par=tau2par.bvn
qcond=qcondbvn
select.random=c(1,2,4)
start=c(rep(0.6,5),rep(0.5,3),c(0.01,-0.01))
est.norm=imperfect.trivariateVineCopulaREMADA.norm.comprehensive(y11,y10,
y01,y00,gl,mgrid,qcond,tau2par,select.random,start)
tau2par1=tau2par.cln180
qcond1=qcondcln180
tau2par2=tau2par.cln270
qcond2=qcondcln270
est.norm.cln=imperfect.trivariateVineCopulaREMADA.norm(y11,y10,y01,
y00,gl,mgrid,qcond1,tau2par1,qcond2,tau2par2,select.random,start)
start=c(rep(0.6,5),rep(0.05,3),c(0.1,-0.1))
est.beta=imperfect.trivariateVineCopulaREMADA.beta.comprehensive(y11,y10,y01,y00,
gl,mgrid,qcond,tau2par,select.random,start)
est.beta.cln=imperfect.trivariateVineCopulaREMADA.beta(y11,y10,y01,y00,
gl,mgrid,qcond1,tau2par1,qcond2,tau2par2,select.random,start)
detach(Pap)
Maximum likelihood estimation of bivariate copula mixed models for meta-analysis of diagnostic accuracy studies without a gold standard
Description
The estimated parameters can be obtained by using a quasi-Newton method applied to the logarithm of the joint likelihood. This numerical method requires only the objective function, i.e., the logarithm of the joint likelihood, while the gradients are computed numerically and the Hessian matrix of the second order derivatives is updated in each iteration. The standard errors (SE) of the ML estimates can be also obtained via the gradients and the Hessian computed numerically during the maximization process.
Usage
imperfectCopulaREMADA.norm(y11,y10,y01,y00,
gl,mgrid,qcond,tau2par,select.random,start)
imperfectCopulaREMADA.beta(y11,y10,y01,y00,
gl,mgrid,qcond,tau2par,select.random,start)
Arguments
y11 |
the number of the test results where the index test outcome is positive and the reference test outcome is positive |
y10 |
the number of the test results where the index test outcome is positive and the reference test outcome is negative |
y01 |
the number of the test results where the index test outcome is negative and the reference test outcome is positive |
y00 |
the number of the test results where the index test outcome is negative and the reference test outcome is negative |
gl |
a list containing the components of Gauss-Legendre nodes |
mgrid |
a list containing two matrices with the rows of the output matrix x are copies of the vector |
select.random |
vector |
qcond |
function for the inverse of conditional copula cdf |
tau2par |
function for maping Kendall's tau to copula parameter |
start |
starting values for the parameters |
Value
A list containing the following components:
LogLikelihood |
the maximized log-likelihood |
Estimates |
the MLE |
SE |
the standard errors |
References
Nikoloulopoulos, A.K. (2025) Vine copula mixed models for meta-analysis of diagnostic accuracy studies without a gold standard. Biometrics, 81(2), ujaf037. doi:10.1093/biomtc/ujaf037.
Examples
data(Pap)
attach(Pap)
nq=30
gl=gauss.quad.prob(nq,"uniform")
mgrid<- meshgrid(gl$n,gl$n)
tau2par=tau2par.bvn
qcond=qcondbvn
select.random=c(1,2)
start=c(rep(0.6,5),rep(0.5,2),-0.1)
est.norm=imperfectCopulaREMADA.norm(y11,y10,y01,y00,gl,mgrid,
qcond,tau2par,select.random,start)
detach(Pap)
Maximum likelihood estimation of univariate mixed models for meta-analysis of diagnostic accuracy studies without a gold standard
Description
The estimated parameters can be obtained by using a quasi-Newton method applied to the logarithm of the joint likelihood. This numerical method requires only the objective function, i.e., the logarithm of the joint likelihood, while the gradients are computed numerically and the Hessian matrix of the second order derivatives is updated in each iteration. The standard errors (SE) of the ML estimates can be also obtained via the gradients and the Hessian computed numerically during the maximization process.
Usage
imperfectREMADA.norm(y11,y10,y01,y00,gl,select.random,start)
imperfectREMADA.beta(y11,y10,y01,y00,gl,select.random,start)
Arguments
y11 |
the number of the test results where the index test outcome is positive and the reference test outcome is positive |
y10 |
the number of the test results where the index test outcome is positive and the reference test outcome is negative |
y01 |
the number of the test results where the index test outcome is negative and the reference test outcome is positive |
y00 |
the number of the test results where the index test outcome is negative and the reference test outcome is negative |
gl |
a list containing the components of Gauss-Legendre nodes |
select.random |
a scalar from 1 to 5 that indicates the random effect |
start |
starting values for the parameters |
Value
A list containing the following components:
LogLikelihood |
the maximized log-likelihood |
Estimates |
the MLE |
SE |
the standard errors |
References
Nikoloulopoulos, A.K. (2025) Vine copula mixed models for meta-analysis of diagnostic accuracy studies without a gold standard. Biometrics, 81(2), ujaf037. doi:10.1093/biomtc/ujaf037.
Examples
data(Pap)
attach(Pap)
nq=30
gl=gauss.quad.prob(nq,"uniform")
start=c(rep(0.6,5),0.5)
select.random=1
est.norm=imperfectREMADA.norm(y11,y10,y01,y00,gl,
select.random,start)
start=c(rep(0.6,5),0.1)
est.beta=imperfectREMADA.beta(y11,y10,y01,y00,gl,
select.random,start)
detach(Pap)
A list containing four-dimensional arrays
Description
A list containing four-dimensional arrays. Replicates of the quadrature points that produce a 4-dimensional full grid.
Examples
data(mgrid15)
dim(mgrid15$x)
dim(mgrid15$y)
dim(mgrid15$z)
dim(mgrid15$w)
data(mgrid30)
dim(mgrid30$x)
dim(mgrid30$y)
dim(mgrid30$z)
dim(mgrid30$w)
data(mgrid50)
dim(mgrid50$x)
dim(mgrid50$y)
dim(mgrid50$z)
dim(mgrid50$w)
A list containing five-dimensional arrays
Description
A list containing five-dimensional arrays. Replicates of the quadrature points that produce a 5-dimensional full grid.
Examples
data(mgrid5d15)
dim(mgrid5d15$x1)
dim(mgrid5d15$x2)
dim(mgrid5d15$x3)
dim(mgrid5d15$x4)
dim(mgrid5d15$x5)
data(mgrid5d30)
dim(mgrid5d30$x1)
dim(mgrid5d30$x2)
dim(mgrid5d30$x3)
dim(mgrid5d30$x4)
dim(mgrid5d30$x5)
A list containing six-dimensional arrays
Description
A list containing six-dimensional arrays. Replicates of the quadrature points that produce an 6-dimensional full grid.
Examples
data(mgrid6d)
dim(mgrid$x1)
dim(mgrid$x2)
dim(mgrid$x3)
dim(mgrid$x4)
dim(mgrid$x5)
dim(mgrid$x6)
Maximum likelhood estimation for multinomial six-variate 1-truncated D-vine copula mixed models for meta-analysis of two diagnostic tests accounting for within and between studies dependence
Description
The estimated parameters can be obtained by using a quasi-Newton method applied to the logarithm of the joint likelihood. This numerical method requires only the objective function, i.e., the logarithm of the joint likelihood, while the gradients are computed numerically and the Hessian matrix of the second order derivatives is updated in each iteration. The standard errors (SE) of the ML estimates can be also obtained via the gradients and the Hessian computed numerically during the maximization process.
Usage
multinom6dVineCopulaREMADA.norm(y001,y011,y101,y111,y000,y010,y100,y110,
gl,mgrid,qcond1,qcond2,qcond3,qcond4,qcond5,
tau2par1,tau2par2,tau2par3,tau2par4,tau2par5,
sel1,sel2,sel3)
multinom6dVineCopulaREMADA.beta(y001,y011,y101,y111,y000,y010,y100,y110,
gl,mgrid,qcond1,qcond2,qcond3,qcond4,qcond5,
tau2par1,tau2par2,tau2par3,tau2par4,tau2par5,
sel1,sel2,sel3)
Arguments
y001 |
the number of the test results in the diseased where the test 1 outcome is negative and the test 2 outcome is negative |
y011 |
the number of the test results in the diseased where the test 1 outcome is negative and the test 2 outcome is positive |
y101 |
the number of the test results in the diseased where the test 1 outcome is positive and the test 2 outcome is negative |
y111 |
the number of the test results in the diseased where the test 1 outcome is positive and the test 2 outcome is positive |
y000 |
the number of the test results in the non-diseased where the test 1 outcome is negative and the test 2 outcome is negative |
y010 |
the number of the test results in the non-diseased where the test 1 outcome is negative and the test 2 outcome is positive |
y100 |
the number of the test results in the non-diseased where the test 1 outcome is positive and the test 2 outcome is negative |
y110 |
the number of the test results in the non-diseased where the test 1 outcome is positive and the test 2 outcome is positive |
gl |
a list containing the components of Gauss-Legendre nodes |
mgrid |
a list containing six-dimensional arrays. Replicates of the quadrature points that produce a 6-dimensional full grid |
qcond1 |
function for the inverse conditional copula cdf at the (1,2) bivariate margin |
qcond2 |
function for the inverse conditional copula cdf at the (2,3) bivariate margin |
qcond3 |
function for the inverse conditional copula cdf at the (3,4) bivariate margin |
qcond4 |
function for the inverse conditional copula cdf at the (4,5) bivariate margin |
qcond5 |
function for the inverse conditional copula cdf at the (5,6) bivariate margin |
tau2par1 |
function for maping Kendall's tau at the (1,2) bivariate margin to copula parameter |
tau2par2 |
function for maping Kendall's tau at the (2,3) bivariate margin to copula parameter |
tau2par3 |
function for maping Kendall's tau at the (3,4) bivariate margin to copula parameter |
tau2par4 |
function for maping Kendall's tau at the (4,5) bivariate margin to copula parameter |
tau2par5 |
function for maping Kendall's tau at the (5,6) bivariate margin to copula parameter |
sel1 |
Indicates the position of bivariate copulas with positive dependence only such as the Clayton and the Clayton rotated by 180 degrees |
sel2 |
Indicates the position of bivariate copulas with negative dependence only such as the Clayton rotated by 90 degrees and the Clayton rotated by 270 degrees |
sel3 |
Indicates the position of bivariate copulas with comprehensive dependence such as the BVN and Frank copulas |
Value
A list containing the following components:
minimum |
the value of the estimated minimum of the negative log-likelihood |
estimate |
the MLE |
gradient |
the gradient at the estimated minimum of of the negative log-likelihood |
hessian |
the hessian at the estimated minimum of the negative log-likelihood |
code |
an integer indicating why the optimization process terminated |
iterations |
the number of iterations performed |
For more details see nlm
References
Nikoloulopoulos, A.K. (2024) Joint meta-analysis of two diagnostic tests accounting for within and between studies dependence. Statistical Methods in Medical Research, 33(10), 1800–1817. doi:10.1177/09622802241269645.
See Also
Examples
data(Down)
attach(Down)
y111=down_n_11
y110=nodown_n_11
y101=down_n_10
y100=nodown_n_10
y001=down_n_00
y000=nodown_n_00
y010=nodown_n_01
y011=down_n_01
nq=15
gl=gauss.quad.prob(nq,"uniform")
data(mgrid6d)
tau2par1=tau2par.cln90
qcond1=qcondcln90
tau2par3=tau2par4=tau2par5=tau2par.cln
qcond3=qcond4=qcond5=qcondcln
tau2par2=tau2par.bvn
qcond2=qcondbvn
sel1=3:5; sel2=1; sel3=2
est=multinom6dVineCopulaREMADA.norm(y001,y011,y101,y111,
y000,y010,y100,y110,gl,mgrid,qcond1,qcond2,qcond3,qcond4,qcond5,
tau2par1,tau2par2,tau2par3,tau2par4,tau2par5,sel1,sel2,sel3)
detach(Down)
Maximum likelhood estimation for multinomial quadrivariate (truncated) D-vine copula mixed models for diagnostic test accurracy studies accounting for non-evaluable outcomes
Description
The estimated parameters can be obtained by using a quasi-Newton method applied to the logarithm of the joint likelihood. This numerical method requires only the objective function, i.e., the logarithm of the joint likelihood, while the gradients are computed numerically and the Hessian matrix of the second order derivatives is updated in each iteration. The standard errors (SE) of the ML estimates can be also obtained via the gradients and the Hessian computed numerically during the maximization process.
Usage
multinomVineCopulaREMADA.norm(TP,FN,FP,TN,NEP,NEN,
gl,mgrid,qcond1,pcond1,tau2par1,
qcond2,pcond2,tau2par2)
multinomVineCopulaREMADA.beta(TP,FN,FP,TN,NEP,NEN,
gl,mgrid,qcond1,pcond1,tau2par1,
qcond2,pcond2,tau2par2)
tmultinomVineCopulaREMADA.norm(TP,FN,FP,TN,NEP,NEN,
gl,mgrid,
qcond1,pcond1,tau2par1,
qcond2,pcond2,tau2par2)
tmultinomVineCopulaREMADA.beta(TP,FN,FP,TN,NEP,NEN,
gl,mgrid,
qcond1,pcond1,tau2par1,
qcond2,pcond2,tau2par2)
Arguments
TP |
the number of true positives |
FN |
the number of false negatives |
FP |
the number of false positives |
TN |
the number of true negatives |
NEP |
the number of non-evaluable positives in the presence of non-evaluable subjects |
NEN |
the number of non-evaluable negatives in the presence of non-evaluable subjects |
gl |
a list containing the components of Gauss-Legendre nodes |
mgrid |
a list containing 4-dimensional arrays. |
qcond1 |
function for the inverse conditional copula cdf at the (1,2) and (3,4) bivariate margin |
pcond1 |
function for the conditional copula cdf at the (1,2) and (3,4) bivariate margin |
tau2par1 |
function for maping Kendall's tau at the (1,2) and (3,4) bivariate margin to copula parameter |
qcond2 |
function for the inverse conditional copula cdf at the (2,3) bivariate margin |
pcond2 |
function for the conditional copula cdf at the (2,3) bivariate margin |
tau2par2 |
function for maping Kendall's tau at the (2,3) bivariate margin to copula parameter |
Value
A list containing the following components:
minimum |
the value of the estimated minimum of the negative log-likelihood |
estimate |
the MLE |
gradient |
the gradient at the estimated minimum of of the negative log-likelihood |
hessian |
the hessian at the estimated minimum of the negative log-likelihood |
code |
an integer indicating why the optimization process terminated |
iterations |
the number of iterations performed |
For more details see nlm
References
Nikoloulopoulos, A.K. (2020) A multinomial quadrivariate D-vine copula mixed model for diagnostic studies meta-analysis in the presence of non-evaluable subjects. Statistical Methods in Medical Research, 29 (10), 2988–3005. doi:10.1177/0962280220913898.
See Also
Examples
nq=15
gl=gauss.quad.prob(nq,"uniform")
data(mgrid15)
data(MK2016)
attach(MK2016)
out=tmultinomVineCopulaREMADA.beta(TP,FN,FP,TN,NEP,NEN,
gl,mgrid15,qcondcln180,pcondcln180,tau2par.cln180,
qcondcln90,pcondcln90,tau2par.cln90)
detach(MK2016)
Bivariate copula conditional distribution functions
Description
Bivariate copula conditional distribution functions
Usage
pcondbvn(v,u,cpar)
pcondfrk(v,u,cpar)
pcondcln(v,u,cpar)
pcondcln90(v,u,cpar)
pcondcln270(v,u,cpar)
Arguments
v |
conditioning value in interval 0,1; could be a vector |
u |
value in interval 0,1; could be a vector |
cpar |
copula parameter: scalar. |
Details
Choices appending 'cop' are bvn, frk, cln, cln90 (rotated by 90 degrees cln), cln180 (rotated by 180 degrees cln), cln270 (rotated by 270 degrees cln).
See help page for dcop
for the abbreviations of the copula names.
Value
inverse conditional cdf value(s)
References
Joe H (1997) Multivariate Models and Dependence Concepts. Chapman & Hall
Joe H (2014) Dependence Modeling with Copulas. Chapman & Hall/CRC.
Joe H (2014) CopulaModel: Dependence Modeling with Copulas. Software for book: Dependence Modeling with Copulas, Chapman & Hall/CRC, 2014.
See Also
Bivariate copula conditional quantile functions
Description
Bivariate copula conditional quantile functions
Usage
qcondbvn(p,u,cpar)
qcondfrk(p,u,cpar)
qcondcln(p,u,cpar)
qcondcln90(p,u,cpar)
qcondcln270(p,u,cpar)
Arguments
u |
conditioning value in interval 0,1; could be a vector |
p |
quantile in interval 0,1; could be a vector |
cpar |
copula parameter: scalar. |
Details
Choices appending 'cop' are bvn, frk, cln, cln90 (rotated by 90 degrees cln), cln180 (rotated by 180 degrees cln), cln270 (rotated by 270 degrees cln).
See help page for dcop
for the abbreviations of the copula names.
Value
inverse conditional cdf value(s)
References
Joe H (1997) Multivariate Models and Dependence Concepts. Chapman & Hall
Joe H (2014) Dependence Modeling with Copulas. Chapman & Hall/CRC.
Joe H (2014) CopulaModel: Dependence Modeling with Copulas. Software for book: Dependence Modeling with Copulas, Chapman & Hall/CRC, 2014.
See Also
Maximum likelihood estimation of quadrivariate D-vine copula mixed models for joint meta-analysis and comparison of two diagnostic tests
Description
The estimated parameters can be obtained by using a quasi-Newton method applied to the logarithm of the joint likelihood. This numerical method requires only the objective function, i.e., the logarithm of the joint likelihood, while the gradients are computed numerically and the Hessian matrix of the second order derivatives is updated in each iteration. The standard errors (SE) of the ML estimates can be also obtained via the gradients and the Hessian computed numerically during the maximization process.
Usage
quadVineCopulaREMADA.norm(TP1,FN1,FP1,TN1,TP2,FN2,FP2,TN2,
gl,mgrid,qcond1,pcond1,tau2par1,
qcond2,pcond2,tau2par2)
quadVineCopulaREMADA.beta(TP1,FN1,FP1,TN1,TP2,FN2,FP2,TN2,
gl,mgrid,qcond1,pcond1,tau2par1,
qcond2,pcond2,tau2par2)
quadVineCopulaREMADA.norm.beta(TP1,FN1,FP1,TN1,TP2,FN2,FP2,TN2,
gl,mgrid,qcond1,pcond1,tau2par1,
qcond2,pcond2,tau2par2)
Arguments
TP1 |
the number of true positives for test 1 |
FN1 |
the number of false negatives for test 1 |
FP1 |
the number of false positives for test 1 |
TN1 |
the number of true negatives for test 1 |
TP2 |
the number of true positives for test 2 |
FN2 |
the number of false negatives for test 2 |
FP2 |
the number of false positives for test 2 |
TN2 |
the number of true negatives for test 2 |
gl |
a list containing the components of Gauss-Legendre nodes |
mgrid |
a list containing four-dimensional arrays. Replicates of the quadrature points that produce a 4-dimensional full grid |
qcond1 |
function for the inverse conditional copula cdf at the (1,2) bivariate margin |
pcond1 |
function for the conditional copula cdf at the (1,2) bivariate margin |
tau2par1 |
function for maping Kendall's tau at the (1,2) bivariate margin to copula parameter |
qcond2 |
function for the inverse conditional copula cdf at the (3,4) bivariate margin |
pcond2 |
function for the conditional copula cdf at the (3,4) bivariate margin |
tau2par2 |
function for maping Kendall's tau at the (3,4) bivariate margin to copula parameter |
Value
A list containing the following components:
minimum |
the value of the estimated minimum of the negative log-likelihood |
estimate |
the MLE |
gradient |
the gradient at the estimated minimum of of the negative log-likelihood |
hessian |
the hessian at the estimated minimum of the negative log-likelihood |
code |
an integer indicating why the optimization process terminated |
iterations |
the number of iterations performed |
For more details see nlm
References
Nikoloulopoulos, A.K. (2019) A D-vine copula mixed model for joint meta-analysis and comparison of diagnostic tests. Statistical Methods in Medical Research, 28(10-11):3286–3300. doi:10.1177/0962280218796685.
Examples
nq=15
gl=gauss.quad.prob(nq,"uniform")
data(mgrid15)
data(arthritis)
attach(arthritis)
qcond1=qcondcln270
pcond1=pcondcln270
tau2par1=tau2par.cln270
qcond2=qcondfrk
pcond2=pcondfrk
tau2par2=tau2par.frk
out<-quadVineCopulaREMADA.norm(TP1,FN1,FP1,TN1,TP2,FN2,FP2,TN2,
gl,mgrid15,qcond1,pcond1,tau2par1,qcond2,pcond2,tau2par2)
detach(arthritis)
Simulation from copula mixed models for diagnostic test accuaracy studies
Description
To simulate the data we have used the following steps:
1. Simulate the study size n
from a shifted gamma distribution with parameters \alpha=1.2,\beta=0.01,lag=30
and round off to the nearest integer.
2. Simulate (u_1,u_2)
from a parametric family of copulas 'cop'.
3. Convert to beta realizations or normal realizations.
4. Draw the number of diseased n_1
from a B(n,0.43)
distribution.
5. Set n_2=n-n_1, y_j=n_jx_j
and then round y_j
for j=1,2
.
Usage
rCopulaREMADA.norm(N,p,si,tau,rcop,tau2par)
rCopulaREMADA.beta(N,p,g,tau,rcop,tau2par)
Arguments
N |
sample size |
p |
Pair |
si |
Pair |
g |
Pair |
tau |
Kendall's tau value |
rcop |
function for copula generation |
tau2par |
function for mapping from Kendall's tau to copula parameter |
Value
A list containing the following simulated components:
TP |
the number of true positives |
FN |
the number of false negatives |
FP |
the number of false positives |
TN |
the number of true negatives |
References
Nikoloulopoulos, A.K. (2015) A mixed effect model for bivariate meta-analysis of diagnostic test accuracy studies using a copula representation of the random effects distribution. Statistics in Medicine, 34, 3842–3865. doi:10.1002/sim.6595.
See Also
Examples
nq=15
gl=gauss.quad.prob(nq,"uniform")
mgrid<- meshgrid(gl$n,gl$n)
N=20
tau=-0.5
p=c(0.7,0.9)
g=c(0.2,0.1)
simDat=rCopulaREMADA.beta(N,p,g,tau,rcln270,tau2par.cln270)
TP=simDat$TP
TN=simDat$TN
FP=simDat$FP
FN=simDat$FN
c270est.b=CopulaREMADA.beta(TP,FN,FP,TN,gl,mgrid,qcondcln270,tau2par.cln270)
si=c(2,1)
tau=0.5
simDat=rCopulaREMADA.norm(N,p,si,tau,rcln,tau2par.cln)
TP=simDat$TP
TN=simDat$TN
FP=simDat$FP
FN=simDat$FN
cest.n=CopulaREMADA.norm(TP,FN,FP,TN,gl,mgrid,qcondcln,tau2par.cln)
Simulation from 1-factor copula mixed models for joint meta-analysis of T
diagnostic tests
Description
Simulation from 1-factor copula mixed models for joint meta-analysis of T
diagnostic tests
Usage
rFactorCopulaREMADA.norm(N,p,si,taus,qcond1,tau2par1,qcond2,tau2par2)
rFactorCopulaREMADA.beta(N,p,g,taus,qcond1,tau2par1,qcond2,tau2par2)
Arguments
N |
number of studies |
p |
vector of sensitivities and specificities |
si |
vector of variabilities; normal margins |
g |
vector of variabilities; beta margins |
taus |
Kendall's tau values |
qcond1 |
function for the inverse conditional copula cdfs that link the factor with the latent sensitivities |
tau2par1 |
function for maping Kendall's tau to copula parameter at the copulas that link the factor with the latent sensitivities |
qcond2 |
function for the inverse conditional copula cdfs that link the factor with the latent specificities |
tau2par2 |
function for maping Kendall's tau to copula parameter at the copulas that link the factor with the latent specificities |
Value
A list with the simulated data in matrices with T
columns and N
rows.
- TP
the number of true positives
- FN
the number of false negatives
- FP
the number of false positives
- TN
the number of true negatives
References
Nikoloulopoulos, A.K. (2022) An one-factor copula mixed model for joint meta-analysis of multiple diagnostic tests. Journal of the Royal Statistical Society: Series A (Statistics in Society), 185 (3), 1398–1423. doi:10.1111/rssa.12838.
Examples
N=50
qcond1=qcondcln
tau2par1=tau2par.cln
qcond2=qcondcln270
tau2par2=tau2par.cln270
p=c(0.8,0.7,0.8,0.7,0.8,0.7)
mu=log(p/(1-p))
si=rep(1,6)
taus=c(0.6,0.7,0.5,-0.3,-0.4,-0.2)
out=rFactorCopulaREMADA.norm(N,p,si,taus,qcond1,tau2par1,qcond2,tau2par2)
TP=out$TP
FN=out$FN
TN=out$TN
FP=out$FP
Simulation from trivariate vine copula mixed models for diagnostic test accuaracy studies accounting for disease prevalence and non-evaluable results
Description
Simulation from trivariate vine copula mixed models for diagnostic test accuaracy studies accounting for disease prevalence and non-evaluable results
Usage
rVineCopulaREMADA.beta(N,p,g,taus,omega1,omega0,qcondcop12,qcondcop13,
qcondcop23,tau2par12,tau2par13,tau2par23)
rVineCopulaREMADA.norm(N,p,si,taus,omega1,omega0,qcondcop12,qcondcop13,
qcondcop23,tau2par12,tau2par13,tau2par23)
Arguments
N |
sample size |
p |
Vector |
si |
Vector |
g |
Vector |
taus |
Kendall's tau values |
omega1 |
the probability for non-evaluable positives |
omega0 |
the probability for non-evaluable negatives |
qcondcop12 |
function for the inverse of conditional copula cdf at the (1,2) bivariate margin |
qcondcop13 |
function for the inverse of conditional copula cdf at the (1,3) bivariate margin |
qcondcop23 |
function for the inverse of conditional copula cdf at the (2,3|1) bivariate margin |
tau2par12 |
function for maping Kendall's tau at the (1,2) bivariate margin to copula parameter |
tau2par13 |
function for maping Kendall's tau at the (1,3) bivariate margin to copula parameter |
tau2par23 |
function for maping Kendall's tau at the (2,3|1) bivariate margin to the conditional copula parameter |
Value
Simuated data with 6 columns and N
rows.
- TP
the number of true positives
- FN
the number of false negatives
- FP
the number of false positives
- TN
the number of true negatives
- NEP
the number of non-evaluable positives
- NEN
the number of non-evaluable negatives
References
Nikoloulopoulos, A.K. (2017) A vine copula mixed effect model for trivariate meta-analysis of diagnostic test accuracy studies accounting for disease prevalence. Statistical Methods in Medical Research, 26, 2270–2286. doi:10.1177/0962280215596769.
Nikoloulopoulos, A.K. (2018) A vine copula mixed model for trivariate meta-analysis of diagnostic studies accounting for disease prevalence and non-evaluable subjects. ArXiv e-prints, arXiv:1812.03685. https://arxiv.org/abs/1812.03685.
See Also
Examples
p=c(0.8,0.7,0.4)
g=c(0.1,0.1,0.05)
taus=c(-0.5,-0.3,-0.0001)
qcondcop12=qcondcop23=qcondcop13=qcondcln90
tau2par12=tau2par23=tau2par13=tau2par.cln90
# in the absence of non-evaluable results
omega1=0
omega0=0
rVineCopulaREMADA.beta(50,p,g,taus,omega1,omega0,
qcondcop12,qcondcop13,qcondcop23,tau2par12,
tau2par13,tau2par23)
# in the presence of non-evaluable results
omega1=0.1
omega0=0.2
rVineCopulaREMADA.beta(50,p,g,taus,omega1,omega0,
qcondcop12,qcondcop13,qcondcop23,tau2par12,
tau2par13,tau2par23)
Simulation from parametric bivariate copula families
Description
Simulation from parametric bivariate copula families
Usage
rbvn(N,cpar)
rfrk(N,cpar)
rcln(N,cpar)
rcln90(N,cpar)
rcln270(N,cpar)
Arguments
N |
sample size |
cpar |
copula parameter: scalar |
Details
Choices are 'cop' in rcop are bvn, frk, cln, cln90 (rotated by 90 degrees cln), cln180 (rotated by 180 degrees cln), cln270 (rotated by 270 degrees cln).
See help page for dcop
for the abbreviations of the copula names.
Value
nx2 matrix with values in (0,1)
References
Joe H (1997) Multivariate Models and Dependence Concepts. Chapman & Hall
Joe H (2014) Dependence Modeling with Copulas. Chapman & Hall/CRC.
Joe H (2014) CopulaModel: Dependence Modeling with Copulas. Software for book: Dependence Modeling with Copulas, Chapman & Hall/CRC, 2014.
See Also
Simulation from trivariate 1-truncated D-vine copula mixed models for meta-analysis of diagnostic accuracy studies without a gold standard
Description
Simulation from trivariate 1-truncated D-vine copula mixed models for meta-analysis of diagnostic accuracy studies without a gold standard
Usage
rimperfect.trivariateVineCopulaREMADA.norm(N,p,si,taus,select.random,qcond1,
tau2par1,qcond2,tau2par2)
rimperfect.trivariateVineCopulaREMADA.beta(N,p,g,taus,select.random,qcond1,
tau2par1,qcond2,tau2par2)
Arguments
N |
sample size |
p |
Vector |
si |
Vector |
g |
Vector |
taus |
Kendall's tau values |
select.random |
vector |
qcond1 |
function for the inverse of conditional copula cdf for the |
tau2par1 |
function for maping Kendall's tau to copula parameter for the |
qcond2 |
function for the inverse of conditional copula cdf for the |
tau2par2 |
function for maping Kendall's tau to copula parameter for the |
Value
Simulated data with 4 columns and N
rows.
- y11
the number of the test results where the index test outcome is positive and the reference test outcome is positive
- y10
the number of the test results where the index test outcome is positive and the reference test outcome is negative
- y01
the number of the test results where the index test outcome is negative and the reference test outcome is positive
- y00
the number of the test results where the index test outcome is negative and the reference test outcome is negative
References
Nikoloulopoulos, A.K. (2025) Vine copula mixed models for meta-analysis of diagnostic accuracy studies without a gold standard. Biometrics, 81(2), ujaf037. doi:10.1093/biomtc/ujaf037.
Examples
N=59
p=c(0.631,0.653,0.902,0.843,0.987)
si=c(1.513,1.341,1.341)
taus=c(0.3,-0.3)
select.random=c(1,2,4)
out=rimperfect.trivariateVineCopulaREMADA.norm(N,p,si,taus,select.random,
qcondcln180,tau2par.cln180,qcondcln270,tau2par.cln270)
g=c(0.290,0.244,0.190)
out=rimperfect.trivariateVineCopulaREMADA.beta(N,p,g,taus,select.random,
qcondcln180,tau2par.cln180,qcondcln270,tau2par.cln270)
Simulation from multinomial six-variate 1-truncated D-vine copula mixed models for meta-analysis of two diagnostic tests accounting for within and between studies dependence
Description
Simulation from multinomial six-variate 1-truncated D-vine copula mixed models for meta-analysis of two diagnostic tests accounting for within and between studies dependence
Usage
rmultinom6dVineCopulaREMADA.norm(N,p,si,taus,qcond,tau2par)
rmultinom6dVineCopulaREMADA.beta(N,p,g,taus,qcond,tau2par)
Arguments
N |
sample size |
p |
Vector |
si |
Vector |
g |
Vector |
taus |
Kendall's tau values |
qcond |
function for the inverse conditional copula cdf |
tau2par |
function for maping Kendall's taus to copula parameters |
Value
Simulated data with 8 columns and N
rows.
- y001
the number of the test results in the diseased where the test 1 outcome is negative and the test 2 outcome is negative
- y011
the number of the test results in the diseased where the test 1 outcome is negative and the test 2 outcome is positive
- y101
the number of the test results in the diseased where the test 1 outcome is positive and the test 2 outcome is negative
- y111
the number of the test results in the diseased where the test 1 outcome is positive and the test 2 outcome is positive
- y000
the number of the test results in the non-diseased where the test 1 outcome is negative and the test 2 outcome is negative
- y010
the number of the test results in the non-diseased where the test 1 outcome is negative and the test 2 outcome is positive
- y100
the number of the test results in the non-diseased where the test 1 outcome is positive and the test 2 outcome is negative
- y110
the number of the test results in the non-diseased where the test 1 outcome is positive and the test 2 outcome is positive
References
Nikoloulopoulos, A.K. (2024) Joint meta-analysis of two diagnostic tests accounting for within and between studies dependence. Statistical Methods in Medical Research, 33(10), 1800–1817. doi:10.1177/09622802241269645.
See Also
Examples
N=11
p=c(0.03667409, 0.09299767, 0.29450436, 0.01733081, 0.04923809, 0.02984361)
si=c(1.69868880, 0.54292079, 0.58489574, 0.92918177, 0.48998484, 0.57004098)
taus=c(-0.52475006, 0.55768873, 0.18454559, 0.02233204, 0.57570506)
tau2par=tau2par.bvn
qcond=qcondbvn
out=rmultinom6dVineCopulaREMADA.norm(N,p,si,taus,qcond,tau2par)
y101=out[,1]
y011=out[,2]
y111=out[,3]
y001=out[,4]
y100=out[,5]
y010=out[,6]
y110=out[,7]
y000=out[,8]
Simulation from multinomial quadrivariate (truncated) D-vine copula mixed models for diagnostic test accurracy studies accounting for non-evaluable outcomes
Description
Simulation from multinomial quadrivariate (truncated) D-vine copula mixed models for diagnostic test accurracy studies accounting for non-evaluable outcomes
Usage
rmultinomVineCopulaREMADA.norm(N,p,si,taus,qcond1,
pcond1,tau2par1,qcond2,
pcond2,tau2par2)
rmultinomVineCopulaREMADA.beta(N,p,g,taus,qcond1,
pcond1,tau2par1,qcond2,
pcond2,tau2par2)
Arguments
N |
sample size |
p |
Vector |
si |
Vector |
g |
Vector |
taus |
Kendall's tau values |
qcond1 |
function for the inverse conditional copula cdf at the (1,2) and (3,4) bivariate margin |
pcond1 |
function for the conditional copula cdf at the (1,2) and (3,4) bivariate margin |
tau2par1 |
function for maping Kendall's tau at the (1,2) and (3,4) bivariate margin to copula parameter |
qcond2 |
function for the inverse conditional copula cdf at the (2,3) bivariate margin |
pcond2 |
function for the conditional copula cdf at the (2,3) bivariate margin |
tau2par2 |
function for maping Kendall's tau at the (2,3) bivariate margin to copula parameter |
Value
Simulated data with 6 columns and N
rows.
- TP
the number of true positives
- FN
the number of false negatives
- FP
the number of false positives
- TN
the number of true negatives
- NEP
the number of non-evaluable positives
- NEN
the number of non-evaluable negatives
References
Nikoloulopoulos, A.K. (2020) A multinomial quadrivariate D-vine copula mixed model for diagnostic studies meta-analysis in the presence of non-evaluable subjects. Statistical Methods in Medical Research, 29 (10), 2988–3005. doi:10.1177/0962280220913898.
See Also
Examples
N=30
p=c(0.898745016,0.766105342,0.059168715,0.109217888)
g=c(0.090270947,0.079469009,0.367463579,0.154976269)
taus=c( 0.82050793,-0.51867629,0.26457961)
qcond1=qcondcln180
pcond1=pcondcln180
tau2par1=tau2par.cln180
qcond2=qcondcln90
pcond2=pcondcln90
tau2par2=tau2par.cln90
out=rmultinomVineCopulaREMADA.beta(N,p,g,taus,qcond1,pcond1,tau2par1,qcond2,pcond2,tau2par2)
TP=out[,1]
NEP=out[,2]
FN=out[,3]
TN=out[,4]
NEN=out[,5]
FP=out[,6]
Mapping of Kendall's tau and copula parameter
Description
Bivariate copulas: mapping of Kendall's tau and copula parameter.
Usage
tau2par.bvn(tau)
tau2par.frk(tau)
tau2par.cln(tau)
tau2par.cln90(tau)
tau2par.cln180(tau)
tau2par.cln270(tau)
Arguments
tau |
Kendall's tau for the copula |
Details
For abbreviations of names of copula families (after the dot in function
names), see dcop
help page.
Value
copula parameter
References
Joe H (1997) Multivariate Models and Dependence Concepts. Chapman & Hall
Joe H (2014) Dependence Modeling with Copulas. Chapman & Hall/CRC.
Joe H (2014) CopulaModel: Dependence Modeling with Copulas. Software for book: Dependence Modeling with Copulas, Chapman & Hall/CRC, 2014.
See Also
The telomerase data
Description
In Glas et al. (2003) the telomerase marker for the diagnosis of bladder cancer is evaluated using 10 studies. The interest was to define if this non-invasive and cheap marker could replace the standard of cystoscopy or histopathology.
Usage
data(telomerase)
Format
A data frame with 10 observations on the following 4 variables.
- TP
the number of true positives
- FN
the number of false negatives
- FP
the number of false positives
- TN
the number of true negatives
References
Glas A.S., Roos D., Deutekom M., Zwinderman A.H., Bossuyt P.M., Kurth K.H. (2003) Tumor markers in the diagnosis of primary bladder cancer. A systematic review. Journal of Urology, 169(6), 1975–82.
Vuong's test for the comparison of non-nested vine copula mixed models for diagnostic test accuaracy studies
Description
Vuong (1989)'s test for the comparison of non-nested vine copula mixed models for diagnostic test accuaracy studies. It shows if a vine copula mixed model provides better fit than the standard GLMM. We compute the Vuong's test with Model 1 being the vine copula mixed model with BVN copula and normal margins, i.e., the standard GLMM.
Usage
vine.vuong.beta(qcondcop12,qcondcop13,qcondcop23,
tau2par12,tau2par13,tau2par23,param1,param2,TP,FN,FP,TN,gl,mgrid,NEP,NEN)
vine.vuong.norm(qcondcop12,qcondcop13,qcondcop23,
tau2par12,tau2par13,tau2par23,param1,param2,TP,FN,FP,TN,gl,mgrid,NEP,NEN)
tvine.vuong.beta(qcondcop12,qcondcop13,
tau2par12,tau2par13,param1,param2,TP,FN,FP,TN,gl,mgrid,NEP,NEN)
tvine.vuong.norm(qcondcop12,qcondcop13,
tau2par12,tau2par13,param1,param2,TP,FN,FP,TN,gl,mgrid,NEP,NEN)
tvine2.vuong.beta(qcondcop12,qcondcop13,
tau2par12,tau2par13,param1,param2,TP,FN,FP,TN,gl,mgrid,NEP,NEN)
tvine2.vuong.norm(qcondcop12,qcondcop13,
tau2par12,tau2par13,param1,param2,TP,FN,FP,TN,gl,mgrid,NEP,NEN)
Arguments
qcondcop12 |
function for the inverse of conditional copula cdf at the (1,2) bivariate margin for Model 2 |
qcondcop13 |
function for the inverse of conditional copula cdf at the (1,3) bivariate margin for Model 2 |
qcondcop23 |
function for the inverse of conditional copula cdf at the (2,3|1) bivariate margin for Model 2 |
tau2par12 |
function for maping Kendall's tau at the (1,2) bivariate margin to copula parameter for Model 2 |
tau2par13 |
function for maping Kendall's tau at the (1,3) bivariate margin to copula parameter for Model 2 |
tau2par23 |
function for maping Kendall's tau at the (2,3|1) bivariate margin to the conditional copula parameter for Model 2 |
param1 |
parameters for the Model 1. i.e., the GLMM |
param2 |
parameters for the Model 2 |
TP |
the number of true positives |
FN |
the number of false negatives |
FP |
the number of false positives |
TN |
the number of true negatives |
gl |
a list containing the components of Gauss-Legendre nodes |
mgrid |
a list containing three-dimensional arrays |
NEP |
the number of non-evaluable positives in the presence of non-evaluable subjects |
NEN |
the number of non-evaluable negatives in the presence of non-evaluable subjects |
Value
A list containing the following components:
z |
the test statistic |
p-value |
the |
References
Nikoloulopoulos, A.K. (2017) A vine copula mixed effect model for trivariate meta-analysis of diagnostic test accuracy studies accounting for disease prevalence. Statistical Methods in Medical Research, 26, 2270–2286. doi:10.1177/0962280215596769.
Nikoloulopoulos, A.K. (2020) An extended trivariate vine copula mixed model for meta-analysis of diagnostic studies in the presence of non-evaluable outcomes. The International Journal of Biostatistics, 16(2). doi:10.1515/ijb-2019-0107.
Vuong Q.H. (1989) Likelihood ratio tests for model selection and non-nested hypotheses. Econometrica, 57, 307–333.
See Also
Examples
nq=15
gl=gauss.quad.prob(nq,"uniform")
mgrid=meshgrid(gl$n,gl$n,gl$n,nargout=3)
data(betaDG)
attach(betaDG)
#nest.n2=VineCopulaREMADA.norm(TP,FN,FP,TN,gl,mgrid,
#qcondbvn,qcondbvn,qcondbvn,
#tau2par.bvn,tau2par.bvn,tau2par.bvn)
nest.n2.est= #nest.n2$e
c(0.87186926, 0.13696066, 0.70614956, 0.69152133,
0.51780203, 0.70883558, -0.41354870,0.07701287, -0.12111253)
#c090est.b2=VineCopulaREMADA.beta(TP,FN,FP,TN,gl,mgrid,
#qcondcln90,qcondcln,qcondcln90,tau2par.cln90,tau2par.cln,tau2par.cln90)
c090est.b2.est= #c090est.b2$e
c(0.85528463, 0.14667571, 0.68321231, 0.04897466,
0.02776290, 0.08561436, -0.34639172, 0.04621924, -0.21627977)
c090vuong.b2=vine.vuong.beta(qcondcln90,qcondcln,qcondcln90,
tau2par.cln90,tau2par.cln,tau2par.cln90,
nest.n2.est,c090est.b2.est,TP,FN,FP,TN,gl,mgrid)
c090vuong.b2
detach(betaDG)
Vuong's test for the comparison of non-nested copula mixed models for diagnostic test accuaracy studies
Description
Vuong (1989)'s test for the comparison of non-nested copula mixed models for diagnostic test accuaracy studies. It shows if a copula mixed model provides better fit than the standard GLMM. We compute the Vuong's test with Model 1 being the copula mixed model with BVN copula and normal margins, i.e., the standard GLMM.
Usage
vuong.norm(qcond,tau2par,param1,param2,TP,FN,FP,TN,gl,mgrid)
vuong.beta(qcond,tau2par,param1,param2,TP,FN,FP,TN,gl,mgrid)
countermonotonicity.vuong(param1,param2,TP,FN,FP,TN,gl,mgrid)
Arguments
qcond |
function for conditional copula cdf for Model 2 |
tau2par |
function for maping Kendall's tau to copula parameter for Model 2 |
param1 |
parameters for the Model 1. i.e., the GLMM |
param2 |
parameters for the Model 2 |
TP |
the number of true positives |
FN |
the number of false negatives |
FP |
the number of false positives |
TN |
the number of true negatives |
gl |
a list containing the components of Gauss-Legendre nodes |
mgrid |
a list containing two matrices with the rows of the output matrix X are copies of the vector |
Value
A list containing the following components:
z |
the test statistic |
p-value |
the |
References
Nikoloulopoulos, A.K. (2015) A mixed effect model for bivariate meta-analysis of diagnostic test accuracy studies using a copula representation of the random effects distribution. Statistics in Medicine, 34, 3842–3865. doi:10.1002/sim.6595.
Vuong Q.H. (1989) Likelihood ratio tests for model selection and non-nested hypotheses. Econometrica, 57:307–333.
See Also
Examples
nq=15
gl=gauss.quad.prob(nq,"uniform")
mgrid<- meshgrid(gl$n,gl$n)
data(MRI)
attach(MRI)
c270est.b=CopulaREMADA.beta(TP,FN,FP,TN,gl,mgrid,qcondcln270,tau2par.cln270)
nest.n=CopulaREMADA.norm(TP,FN,FP,TN,gl,mgrid,qcondbvn,tau2par.bvn)
c90est.n=CopulaREMADA.norm(TP,FN,FP,TN,gl,mgrid,qcondcln90,tau2par.cln90)
vuong.beta(qcondcln270,tau2par.cln270,nest.n$e,c270est.b$e,TP,FN,FP,TN,gl,mgrid)
vuong.norm(qcondcln90,tau2par.cln90,nest.n$e,c90est.n$e,TP,FN,FP,TN,gl,mgrid)
detach(MRI)
data(CT)
attach(CT)
est.n=countermonotonicCopulaREMADA.norm(TP,FN,FP,TN,gl,mgrid)
est.b=countermonotonicCopulaREMADA.beta(TP,FN,FP,TN,gl,mgrid)
countermonotonicity.vuong(est.n$e,est.b$e,TP,FN,FP,TN,gl,mgrid)
detach(CT)