Learn R Programming

epiR (version 2.0.53)

rsu.dxtest: Sensitivity and specificity of diagnostic tests interpreted in series or parallel

Description

Calculates the sensitivity and specificity of two or three diagnostic tests interpreted in series or parallel.

Usage

rsu.dxtest(se, sp, covar = c(0,0), interpretation = "series")

Value

A list comprised of two elements:

independent

a data frame listing sensitivity se and specificity sp assuming the tests are independent.

dependent

a data frame listing sensitivity se and specificity sp calculated using the values of covar, as entered by the user.

If covar = c(0,0) data frames independent and dependent will be the identical.

Arguments

se

a vector of length two or three defining the diagnostic sensitivity of the two or three tests.

sp

a vector of length two or three defining the diagnostic specificity of the two or three tests.

covar

a vector of length two defining the covariance between test results for disease positive and disease negative groups. The first element of the vector is the covariance between test results for disease positive subjects. The second element of the vector is the covariance between test results for disease negative subjects. If three diagnostic tests are used it is assumed that if there is dependence, it is between tests 2 and 3. See the examples, below for details.

interpretation

a character string indicating how the test results should be interpreted. Options are series or parallel.

References

Dohoo I, Martin S, Stryhn H (2009). Veterinary Epidemiologic Research. AVC Inc Charlottetown, Prince Edward Island, Canada.

Gardner I, Stryhn H, Lind P, Collins M (2000). Conditional dependence between tests affects the diagnosis and surveillance of animal diseases. Preventive Veterinary Medicine 45: 107 - 122.

Martin S, Meek A, Willeberg P (1987). Veterinary Epidemiology Principles and Methods. Iowa State University Press Ames.

Toft N, Akerstedt J, Tharaldsen J, Hopp P (2007). Evaluation of three serological tests for diagnosis of Maedi-Visna virus infection using latent class analysis. Veterinary Microbiology 120: 77 - 86.

Examples

Run this code
## 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), covar = c(0,0),
   interpretation = "series")
   
## 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), covar = c(0.035,-0.001),
   interpretation = "parallel")

## 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. 


## EXAMPLE 3:
## Three diagnostic tests for Brucella suis in dogs are available: the Rose
## Bengal test (RBT), complement fixation (CFT) and an ELISA. The diagnostic
## sensitivities of the three tests are 0.910, 0.907 and 0.930, respectively.
## The diagnostic specificities of the three tests are 0.955, 0.934, and 0.927, 
## respectively. The covariance between the CFT and ELISA test results 
## for disease positive and disease negative groups are 0.063 and 0.042,
## respectively. What is the expected sensitivity and specificity if all three 
## tests are run on an individual and interpreted in parallel? Note that the 
## covariance estimates listed account for dependence between CFT (test 2)
## and the ELISA (test 3).  

rsu.dxtest(se = c(0.910,0.907,0.930), sp = c(0.955,0.934,0.927), 
   covar = c(0.063,0.042), interpretation = "parallel")

## Interpreting the test results in parallel and accounting for depdendence 
## in the CFT and ELISA results returns a diagnostic sensitivity of 
## 0.994 and a diagnostic specificity of 0.867.

## What is the expected sensitivity and specificity if all three 
## tests are run on an individual and interpreted in series?

rsu.dxtest(se = c(0.910,0.907,0.930), sp = c(0.955,0.934,0.927), 
   covar = c(0.063,0.042), interpretation = "series") 
   
## Interpreting the test results in series and accounting for depdendence 
## in the CFT and ELISA results returns a diagnostic sensitivity of 
## 0.825 and a diagnostic specificity of 0.998.

Run the code above in your browser using DataLab