*! midas_eforest.sthlp v1.0.0 Ben Adarkwa Dwamena 2026

Title

midas_eforest -- Exploratory coupled forest plot
(no summary diamond) for meta-analytical integration of diagnostic
accuracy studies

Syntax

midas_eforest
tp fp fn tn
[if] [in],
plottype(string)
[id(varlist)
level(#)
mscale(#)
textscale(#)
combscale(#)
cimethod(string)
cicolor(colorspec)
diamcolor(colorspec)
title(passthru)]

Required
tp fp fn tn numeric variables containing counts of true
positives, false positives, false negatives, and true negatives

plottype(string) plot style; one of generic,
ellipse, thick, or rain

Options
id(varlist) one or two variables whose values are
concatenated to form the study label displayed on the y-axis;
if omitted, observation numbers are used

level(#) confidence level for interval bars; default
95

mscale(#) marker size scale factor; default 0.75

textscale(#) text size scale factor; default 1.0

combscale(#) panel content scale for graph combine
via iscale(); default 0.5; smaller values shrink markers
and text within each combined panel

cimethod(string) confidence interval computation method;
exact (default), wilson, or wald

cicolor(colorspec) colour for confidence interval bars;
any Stata colorspec

diamcolor(colorspec) colour for the study point estimates;
any Stata colorspec

title(passthru) graph title passed through to the plot

Description

midas_eforest produces an exploratory coupled forest plot of
raw study-level sensitivity and specificity estimates with confidence
intervals. The two panels — one for sensitivity, one for specificity —
are displayed side by side on a shared y-axis so that the paired
estimates for each study are directly readable across panels.

Unlike midas_sforest, midas_eforest does not require
a prior estimation command. It operates directly on the tp fp fn tn
variables in memory and does not read from e(). It is therefore
equally useful as a pre-estimation exploratory display or as a
complement to a fitted model.

No summary diamond is shown. The purpose of midas_eforest is to
display the raw data structure — the distribution, spread, and any
shoulder pattern of sensitivity and specificity across studies — before
or alongside formal bivariate meta-analysis.

The command requires the xsvmat package. If not installed:
ssc install xsvmat, replace.

For a post-estimation plot with a pooled summary diamond, see
midas_sforest. For per-study heterogeneity decomposition,
see midas_het.

Options

Required

tp fp fn tn are the four numeric variables containing the 2×2
table cell counts. All four must be specified in this order.

plottype(string) specifies the visual style.
Must be one of generic, ellipse, thick, or rain.
See Plot types for descriptions.

Study labels

id(varlist) specifies one or two variables whose string or numeric
values are concatenated (space-separated) to form the study label on
the y-axis. If two variables are specified — commonly author and year —
their values are joined as author year. If id() is omitted,
observation numbers label the y-axis.

Display

level(#) sets the confidence level for the per-study bars.
Default is 95. Must be between 10 and 99.

mscale(#) scales all markers proportionally. Default is 0.75.

textscale(#) scales all text elements. Default is 1.0.

combscale(#) sets the iscale() argument passed to
graph combine, controlling text and marker size within each
combined panel. Default is 0.5.

cimethod(string) specifies the per-study confidence interval
method: exact (Clopper-Pearson; default), wilson, or
wald.

cicolor(colorspec) sets the colour of confidence interval bars.

diamcolor(colorspec) sets the colour of study point estimate
markers.

Plot types

The plottype() option selects from four visual styles:

generic — standard horizontal dot-and-bar forest plot.
The default and most widely used style.

ellipse — study precision is encoded as the width of a
filled ellipse around the point estimate. Helps identify influential
studies visually.

thick — confidence bars are drawn as filled rectangles,
making uncertainty ranges visually prominent. Useful for small
meta-analyses where individual study variability is of primary interest.

rain — a raincloud-style display combining individual
study dots with a half-density curve showing the distribution of
estimates across studies. Particularly effective for illustrating
the heterogeneity structure before fitting a model.

Examples

Pre-estimation exploratory display

. use fdgpet_axillary, clear

. midas eforest tp fp fn tn, id(author year) plottype(generic)

Ellipse plot highlighting study precision

. midas eforest tp fp fn tn, id(author) plottype(ellipse)

Rain plot with 90% CI

. midas eforest tp fp fn tn, id(author year) plottype(rain) level(90)

Custom colours and compact panels

. midas eforest tp fp fn tn, id(author) plottype(generic) cicolor("100 150 200") combscale(0.4)

Side-by-side with summary forest plot

. midas eforest tp fp fn tn, id(author year) plottype(generic)

. midas_mle tp fp fn tn, id(author) year(year)

. midas sforest, plottype(generic) predinterval

References

Dwamena, B. A. (2009).
MIDAS: Meta-analytical Integration of Diagnostic Accuracy Studies.
Statistical Software Components, Boston College Department of Economics.
https://ideas.repec.org/c/boc/bocode/s456880.html

Reitsma, J. B., Glas, A. S., Rutjes, A. W. S., Scholten, R. J. P. M.,
Bossuyt, P. M., and Zwinderman, A. H. (2005).
Bivariate analysis of sensitivity and specificity produces informative
summary measures in diagnostic reviews.
Journal of Clinical Epidemiology 58(10): 982-990.

Harbord, R. M., and Whiting, P. (2009).
metandi: Meta-analysis of diagnostic accuracy using hierarchical
logistic regression.
Stata Journal 9(2): 211-229.

Author

Ben Adarkwa Dwamena, MD

Clinical Associate Professor Emeritus of Radiology

(Nuclear Medicine and Molecular Imaging)

University of Michigan

East Lansing, Michigan, USA

bdwamena@umich.edu

Please report bugs and suggestions via the MIDAS SSC page or by email.

Also see: midas_sforest, midas_mle,
midas_qrsim, midas_mh, midas_hmc,
midas_inla, midas_het, midas_assess