This package supports stepping through the design of a biomarker validation study. There are two “shiny”-based web apps for interaction and visualization:
shinyCombinePlots
shinyElicit
Displays plots of an NNT scale together with a “contra-Bayes” plot which maps from NNTs or PVs (predictive values) to sensitivity and specificity.
The NNT scale allows you to specify a discomfort zone and values for NNT outside that zone, where clinical decisions would be clearer:
\[NN{T_{Pos}} < \underbrace {NN{T_{Lower}} < NN{T_{Upper}}}_{{\rm{discomfort}}\;{\rm{ range}}} < NN{T_{Neg}}\]
For a prospective study design, the design targets are easy:
\[PPV > 1/NN{T_{Lower}},\quad NPV > 1 - 1/NN{T_{Upper}}\]
For a retrospective study design, given a prevalence value, produce a plot displaying the achievable contours of either predictive values or NNT values. This plot uses the “contra-Bayes” theorem, sesp.from.pv(), as follows:
\[ \begin{array}{l} SP = specificity = \frac{{PPO - Odds}}{{PPO - NP{O^{ - 1}}}}\\ SN = sensitivity = \frac{{NPO - Odd{s^{ - 1}}}}{{NPO - PP{O^{ - 1}}}} \end{array} \]
where
\(Odds = Pr(BestToAct) / Pr(BestToWait)\)
\(PPO = PPV / (1 – PPV)\) = the “positive predictive odds”
\(NPO = NPV / (1 – NPV)\) = the “negative predictive odds”.
TODO:
Calculating anticipated results for prospective and retrospective studies from sample sizes.
Embeds the shinyCombinePlots in a sequence of steps required to elicit the desired clinical applicability. Walking through the steps will lead to a study deign responsive to patients’ needs.
TODO:
After each “Is this step done?” toggle is set to “Done”, the button at the top is enabled. This button is labeled:
When all steps are Done, you can click here for a report
The report is not yet implemented. The table near the top that drives the process can be shown or hidden with the toggle at the left of the window.
source("../stepsTableInitial.R")
pander::pandoc.table(stepsTableInitial)
##
## -------------------------------------------
## Done? Stepping stone
## ------------ ------------------------------
## Not yet done Defining the clinical scenario
##
## Not yet done Defining the NNT discomfort
## zone
##
## Not yet done Choosing target NNTpos and
## NNTneg outside this zone
##
## Not yet done Defining how patients would
## benefit
##
## Not yet done Classification performance
## needed
##
## Not yet done Prospective study requirements
##
## Not yet done Retrospective study
## requirements
## -------------------------------------------
##
## Table: Table continues below
##
##
## ------------------------------
## Question
## ------------------------------
## Who are the patients to help?
## What are the clinical decision
## options?
##
## What region of NNTs (number
## needed to treat) make both
## decisions 'treat' and 'wait'
## uncomfortable?
##
## What NNT's for the BestToAct
## and BestToWait groups would
## make the decision clear-cut?
##
## Specifically how will patients
## be helped by a test that
## achieves these NNT s?
##
## What predictive values do
## these NNT s correspond to?
##
## Given these NNT s, how large
## should a prospective study be,
## and how long the follow-up?
##
## Given a prevalence, what
## sensitivity and specificity do
## we hope for, and what should
## the sample sizes be to
## estimate them sufficiently?
## ------------------------------