[R-sig-Epi] Diagnostic tests metanalisis

Pedro Emmanuel Alvarenga Americano do Brasil emmanuel.brasil at gmail.com
Sun Nov 18 07:24:12 CET 2007


Hello friends of R list,

Im trying for a while to adapt a function develped in SAS and published in "
J.B. Reitsma et al. / Journal of Clinical Epidemiology 58 (2005) 982–990",
wich is a bivariate approch to meta-analysis of diagnotic tests.

Since Im not a statistics or R expert, neither I have any SAS knowledge, Im
having a hard time trying to do so.

There is an appendix at the original txt with some step by step on how to do
it but Im stuck on a more advanced stuff which I cant find a solution.

In a step it is mentioned a Van Houwelingen approach wich I dont know what
it is, and so I can work it out. Also there a REML approach which I could
not find in any library so far.

This is the function so far....

bivar<-function(TP,FP,FN,TN){

        # find a way to sum 0.5 to each null cell

       Se<-TP/(TP+FN)
       Sp<-TN/(TN+FP)
       logSe<-log(Se/(1-Se))
       logSp<-log(Sp/(1-Sp))
       vlogSe<-1/(Se*(1-Se)*(TP+FN))
       vlogSp<-1/(Sp*(1-Sp)*(TN+FP))
       bsvlogSp<-0
       cblog<-0
       bsvlogSp<-0
       sdata<-rbind(bsvlogSp,cblog,bsvlogSp,vlogSe,vlogSp)

this is the SAS sintax available at the original text.....

/*
Use the Proc Mixed module in SAS is used to set up the bivariate model. We
apply the approach of Van Houwelingen et al
to incorporate both the within and between study variance, more details and
explanations can be found there.{van Houwelingen,
2002 #2} Use the restricted maximum likelihood estimation (REML) method in
estimating the model
*/
proc mixed data=bi_meta method=reml cl ; /* option cl will give confidence
intervals */
/* study_id and modality are categorical variables */
class study_id modality;
/* model statement: asking for different estimates of mean sensitivity and
specificity for each modality, provide large value
for degrees of freedom to obtain p-values based on normal distribution
rather than the t-distribution (=default in SAS) */
model logit  dis*modality non_dis*modality / noint cl df=1000, 1000, 1000,
1000, 1000, 1000;
/* random effects for logit sensitivity and specificity with possible
correlation (UN=unstructured covariance structure) */
random dis non_dis / subject=study_id type=un ;
/* use the repeat statement to define different within-study variances for
sens and spec in each study */
repeated / group=rec;
/* name the file holding the all the (co)variances parameters, keep the
within-study variance constant */
parms / parmsdata=cov hold=4 to 91;
/* use contrast statement for testing specific hypotheses */
/* testing for differences in sensitivities */
contrast 'CT_sens vs LAG_sens' dis*modality 1 -1 0 / df=1000 ;
contrast 'CT_sens vs MRI_sens' dis*modality 1 0 -1/ df=1000 ;
contrast 'LAG_sens vs MRI_sens' dis*modality 0 1 -1/ df=1000 ;
/* testing for differences in specificities */
contrast 'CT_spec vs LAG_spec' non_dis*modality 1 -1 0 / df=1000 ;
contrast 'CT_spec vs MRI_spec' non_dis*modality 1 0 -1/ df=1000 ;
contrast 'LAG_spec vs MRI_spec' non_dis*modality 0 1 -1/ df=1000 ;
/* testing for differences in DOR */
contrast 'CT_odds vs LAG_odds ' dis*modality 1 -1 0 non_dis* modality 1 -1 0
/ df=1000 ;
contrast 'CT_odds vs MRI_odds ' dis* modality 1 0 -1 non_dis* modality 1 0
-1 / df=1000 ;
contrast 'LAG_odds vs MRI_odds ' dis* modality 0 1 -1 non_dis* modality 0 1
-1 / df=1000 ;
run;

attached there is a dataset...

If anyone could give me a hand or any tip, it would most welcome!

Best regards to all,

-- 
Abraço forte e que a força esteja com você,
Pedro Emmanuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://stat.ethz.ch/pipermail/r-sig-epi/attachments/20071118/525c96f6/attachment.html 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: metadiag_bivar.txt
Url: https://stat.ethz.ch/pipermail/r-sig-epi/attachments/20071118/525c96f6/attachment.txt 


More information about the R-sig-Epi mailing list