## 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)


### 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 gl$nodes and weights gl$weights mgrid a list containing two matrices with the rows of the output matrix x are copies of the vector gl$nodes; columns of the output matrix y are copies of the vector gl$nodes. For more details see also meshgrid 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.

rCopulaREMADA

### Examples

nq=15
mgrid<- meshgrid(gl$n,gl$n)

data(LAG)
attach(LAG)
detach(LAG)

data(MRI)
attach(MRI)