## EXAMPLE 1:
## You are presented with a dog with lethargy, exercise intolerance,
## weight gain and bilaterally symmetric truncal alopecia. You are
## suspicious of hypothyroidism and take a blood sample to measure
## basal serum thyroxine (T4).
## You believe that around 5% of dogs presented to your clinic with
## a signalment of general debility have hypothyroidism. The serum T4
## has a sensitivity of 0.89 and specificity of 0.85 for diagnosing
## hypothyroidism in the dog. The laboratory reports a serum T4
## concentration of 22.0 nmol/L (reference range 19.0 to 58.0 nmol/L).
## What is the post-test probability that this dog is hypothyroid?
epi.nomogram(pretest.ppos = 0.05, se = 0.890, sp = 0.850,
lratio.pos = NA, lratio.neg = NA, conf = NA, method = "exact",
verbose = FALSE, credible.int = 0.95, nsim = 999)
## Given the reference range of 19.0 to 58.0 nmol/L and a test result of
## 22.0 nmol/L we declare this a negative test result.
## If the pre-test probability of being hypothyroid positive is 0.05 and
## the test is negative, the post-test probability of being hypothyroid
## positive is 0.0068.
## EXAMPLE 2:
## A test with diagnostic sensitivity 0.980 (95% CI 0.894 to 0.999) and
## diagnostic specificity 0.980 (95% CI 0.893 to 0.999) has been developed
## to detect feline hepatic lipidosis (FHL). After conducting a thorough
## clinical examination you are 75% sure that your patient is FHL positive.
## Using the assigned cutpoint for this test, your patient returns a positive
## result. What is the post-test probability that this cat is FHL positive?
epi.nomogram(pretest.ppos = 0.75, se = c(0.980,0.894,0.999),
sp = c(0.980,0.893,0.999), lratio.pos = NA, lratio.neg = NA,
conf = 0.95, method = "exact", verbose = FALSE, credible.int = 0.95,
nsim = 999)
## If the pre-test probability of being FHL positive is 0.75 and the test
## is positive, the post-test probability of being FHL positive is
## 0.99 (95% CrI 0.97 to 1.00).
## If the pre-test probability of being FHL positive is 0.75 and the test
## is negative, the post-test probability of being FHL positive is
## 0.06 (95% CrI 0.0060 to 0.2000). If the cat returns a negative test result
## there's up to a 20% chance that it could still be FHL positive. False
## negatives are a potential problem with this test.
Run the code above in your browser using DataLab