fagan.plot(probs.pre.test, LR, test.result="+")
plotFagan()
plotFagan2()
fagan.plot
creates the plot based on input
to the function. The plotFagan
and plotFagan2
functions set up Tk windows with sliders representing the possible
inputs and show how the plot and the posterior probability changes
when you adjust the inputs. The plotFagan
function creates
sliders for the prior probability and the LR, while the
plotFagan2
function replaces the LR slider with 2 sliders for
the sensitivity and specificity.
More detail on the plots and the math behind them can be found at the
websites below.slider
fagan.plot(0.8, 2)
fagan.plot(0.8, 0.95/(1-0.90) )
plotFagan()
plotFagan2()
Run the code above in your browser using DataLab