# NOT RUN {
## EXAMPLE 1:
## You would like to confirm the absence of disease in a study area. You
## intend to use two tests: the first has a sensitivity and specificity of
## 0.90 and 0.80, respectively. The second has a sensitivity and specificity
## of 0.95 and 0.85, respectively. You need to make sure that an individual
## that returns a positive test really has disease, so the tests will be
## interpreted in series (to improve specificity).
## What is the diagnostic sensitivity and specificity of this testing
## regime?
rsu.dxtest(se = c(0.90,0.95), sp = c(0.80,0.85),
interpretation = "series", covar = c(0,0))
## Interpretation of these tests in series returns a diagnostic sensitivity
## of 0.855 and a diagnostic specificity of 0.970.
## EXAMPLE 2 (from Dohoo, Martin and Stryhn p 113):
## An IFAT and PCR are to be used to diagnose infectious salmon anaemia.
## The diagnostic sensitivity and specificity of the IFAT is 0.784 and 0.951,
## respectively. The diagnostic sensitivity and specificity of the PCR is
## 0.926 and 0.979, respectively. It is known that the two tests are dependent,
## with details of the covariance calculated above. What is the expected
## sensitivity and specificity if the tests are to be interpreted in parallel?
rsu.dxtest(se = c(0.784,0.926), sp = c(0.951,0.979),
interpretation = "parallel", covar = c(0.035,-0.001))
## Interpreting test results in parallel and accounting for the lack of
## test indepdendence returns a diagnostic sensitivity of 0.949 and diagnostic
## specificity of 0.930.
# }
Run the code above in your browser using DataLab