help midas condiplotalso see: midas

Title

midas condiplot -- Conditional post-test probability plot

Syntax

midas condiplot
[if exp]
[in range]
[, options]

Prevalence range
truncated use the observed prevalence range from the estimation; default is [0,1]

Styling
ppvopts(line_options) options for the positive-test probability curve

npvopts(line_options) options for the negative-test probability curve

graph_options any twoway options

Description

midas condiplot displays a Fagan-style conditional probability plot after
a midas mle, midas qrsim, midas mh, midas hmc, or
midas inla estimation command. It plots two curves against prior
probability (prevalence) on the x-axis:

Positive test result (green dashed): post-test probability if the
test is positive, computed as LR+ × prevalence / (1 − prevalence + LR+ × prevalence).

Negative test result (red dash-dot): post-test probability if the
test is negative, computed as LR− × prevalence / (1 − prevalence + LR− × prevalence).

The diagonal reference line (y = x) represents a test with no discriminative
value. The greater the vertical separation between the positive and negative
curves, the more informative the test.

The summary likelihood ratios LR+ and LR− and their confidence limits are
taken from the stored estimation results. With truncated, the x-axis
is restricted to the range of observed prevalence values from the estimation.

Options

truncated restricts the prevalence axis to the range [prevmin, prevmax]
stored by the estimation command rather than the full [0, 1] interval.

ppvopts(line_options) overrides the default style of the
positive-test probability curve (default: green dashed medium line), e.g.
ppvopts(lcolor(navy) lwidth(thick)).

npvopts(line_options) overrides the default style of the
negative-test probability curve (default: red shortdash-dot medium line), e.g.
npvopts(lcolor(maroon) lpattern(dash)).

Returned results

r(LRpos) summary LR+

r(LRpos_lb), r(LRpos_ub) CI bounds for LR+

r(LRneg) summary LR−

r(LRneg_lb), r(LRneg_ub) CI bounds for LR−

r(prev_min), r(prev_max) prevalence range used

Examples

Standard conditional probability plot:

. midas mle tp fp fn tn, id(author)

. midas condiplot

Truncated range with custom curve colors:

. midas condiplot, truncated ppvopts(lcolor(navy) lwidth(thick)) npvopts(lcolor(maroon))

Also see

midas, midas lrmat, midas fagan