[R] Sensitivity and Specificity Forest Plots

Viechtbauer Wolfgang (STAT) wolfgang.viechtbauer at maastrichtuniversity.nl
Tue Nov 22 11:06:58 CET 2011


Essentially, this is a side-by-side forest plot, where the plot on the left is for sensitivity and the plot on the right is for specificity. For 2x2 table data from diagnostic studies, it is easy to calculate the sensitivity and specificity values (and corresponding sampling variances) by hand. In fact, since sensitivity and specificity values are actually simply proportions, you can use the escalc() function in the metafor package to do this for you (just pass the appropriate cell counts to escalc() and use one of the outcome measures listed under "Proportions and Transformations Thereof" -- see help(escalc). Then, you could set up a plotting device with layout() and put the forest plot for sensitivity on the left and the plot for specificity on the right. So, everything is already there to do this.

Best,

Wolfgang

-- 
Wolfgang Viechtbauer, Ph.D., Statistician 
Department of Psychiatry and Psychology 
School for Mental Health and Neuroscience 
Faculty of Health, Medicine, and Life Sciences 
Maastricht University, P.O. Box 616 
6200 MD Maastricht, The Netherlands 
+31 (43) 368-5248 | http://www.wvbauer.com 


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
> On Behalf Of Jonathan Minton
> Sent: Monday, November 21, 2011 17:34
> To: r-help at r-project.org
> Subject: [R] Sensitivity and Specificity Forest Plots
> 
> Dear R Users,
> 
> Do you know of an existing function that allows the production of
> sensitivity and specificity forest plots?
> See the following for an example:
> http://www.google.co.uk/imgres?q=forest+plots+of+sensitivity+and+specifici
> ty&um=1&hl=en&authuser=0&biw=1920&bih=989&tbm=isch&tbnid=JLxXNU7iQ2N_CM:&i
> mgrefurl=http://www.medscape.com/viewarticle/717751_3&docid=NnthE8_KgNQZdM
> &imgurl=http://img.medscape.com/article/717/751/717751-
> fig3.jpg&w=857&h=734&ei=UnzKTvfTGIWC8gPnq4R7&zoom=1&iact=hc&vpx=1300&vpy=2
> 82&dur=19&hovh=208&hovw=243&tx=140&ty=108&sig=112892243842455187632&page=1
> &tbnh=123&tbnw=144&start=0&ndsp=69&ved=1t:429,r:20,s:0
> 
> The standard meta-analysis packages (metafor etc) do not seem to have this
> type of forest plot.
> 
> If I were to construct a bespoke function within R, would you recommend
> using the forest function within metafor, or the dotplot function within
> lattice, or something else entirely as a starting point for constructing
> the function?
> 
> Many thanks,
> 
> --
> Dr Jon Minton
> Decision Support Unit
> Health Economics & Decision Science
> School of Health and Related Research
> University of Sheffield
> Tel: 0114 222 0836
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list