26.1 Bayes Revision - Sensitivity/Specificity

The most common form of Bayes' revision performed in healthcare models relates to imperfect tests using sensitivity and specificity. In a typical model, you screen for a condition, but the test yields some false positives and false negatives. Reported data on the sensitivity and specificity of a test and the prevalence of the disease can be integrated into a model as parameters, which are revised to generate dependent probabilities required for the model.

  • Sensitivity and specificity are statistical measures of the performance of a binary classification test.

  • Sensitivity (also called the true positive rate) measures the proportion of actual positives which are correctly identified as such (e.g. the percentage of sick people who are correctly identified as having the condition).

  • Specificity (also called the true negative rate) measures the proportion of negatives which are correctly identified as such (e.g. the percentage of healthy people who are correctly identified as not having the condition).

For this version of the Bayes' revision, you must first create the model structure to mirror the test results and actual condition. This structure can be anywhere in the tree, but it must follow the structure of a chance node with two branches that are each also chance nodes with two branches. The model we will use here contains that structure and can be used anywhere within a larger model (as required).

The Health Care tutorial example model, BayesSensSpec-start.trex, is presented below.

The model contains the standard test and condition node structure as well as the three variables prevalence, sensitivity and specificity. You need this structure (or the equivalent structure for your model) in place before you do the next step.

To initiate the Bayes' revision using sensitivity and specificity:

  • Select the Give test chance node.

  • Choose Subtree > Bayes' Revision > Sensitivity, Specificity from the menu.

You are then presented with a wizard dialog to walk you through the revision process. In the first step, you simply select the test positive node. Then select the two condition positive nodes that follow the positive and negative test nodes. The dialog uses the node label text to guide you through the process. Then click Next.

Be aware: The radio button for the top branch is always selected in the dialog below. Do not assume that this is the correct selection for your model and review the options appropriately. The descriptions in the Bayes Revision Wizard below are taken from the labels in the tree.

In the model above, the radio button you would need to select for the last option is not the one selected when you open the Wizard. The choice would be Test Neg > Condition Neg.

The next step is to populate variables for the prevalence, sensitivity and specificity values required for the revision. The wizard includes a "Show variable definitions" link if you need to create/define these variables on the fly. In our example, these variables were already defined and can simply be selected.

If you choose to create variables "on the fly" through the mini Variable Definitions View within the Wizard, definitions will be placed at the "root" revision node (the start of the small Bayes Revision tree), which may not be where you want them. You might choose to create the three required variables first, so you can simply reference them within the wizard.

The wizard also contains a "Show Bayes grid" link to allow you to see the calculated values that will be used in the model.

When you click Finish, the revised probability variables are then defined at the "root" revision node with references to the three independent variables. The revised variables are then placed into the tree's branch probabilities. The revision variables are set to be hidden in the tree structure (you can see the "show in tree" check boxes are unchecked below in the Variables View).

The Health Care tutorial example model BayesSensSpec-end.trex includes the final set of revised probabilities. Roll back shows all the calculated revised probabilities in the model.