Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rsu.pstar

Design prevalence back calculation


Description

Calculates design prevalence required for given sample size and desired surveillance system (population-level) sensitivity, assuming representative sampling, imperfect test sensitivity and perfect test specificity.

Usage

rsu.pstar(N = NA, n, se.p, se.u)

Arguments

N

scalar or vector, integer representing the population size. Use NA if unknown.

n

scalar or vector, integer representing the number of units sampled.

se.p

scalar or vector of the same length as n representing the desired surveillance system (population-level) sensitivity.

se.u

scalar or vector of the same length as n representing the unit sensitivity.

Value

A vector of design prevalence estimates.

References

MacDiarmid S (1988). Future options for brucellosis surveillance in New Zealand beef herds. New Zealand Veterinary Journal 36: 39 - 42.

Martin S, Shoukri M, Thorburn M (1992). Evaluating the health status of herds based on tests applied to individuals. Preventive Veterinary Medicine 14: 33 - 43.

Examples

## EXAMPLE 1:
## In a study to provide evidence that your country is free of a given disease
## a total of 280 individuals are sampled. Assume a desired surveillance system
## sensitivity of 0.95 and an individual unit diagnostic sensitivity of 0.98. 
## If all unit tests return a negative result, what is the maximum prevalence 
## if disease is actually present in the population (i.e. what is the design 
## prevalence)? 

rsu.pstar(N = NA, n = 280, se.p = 0.95, se.u = 0.98)

## If 280 individuals are sampled and tested and each returns a negative test
## result the maximum prevalence (if disease is actually present in the 
## population) is 0.011.


## EXAMPLE 2:
## In a study to provide evidence disease freedom a total of 30 individuals 
## are sampled from a set of cattle herds. Assume cattle herds in the study 
## region range from 100 to 5000 cows. As above, assume a desired surveillance 
## system sensitivity of 0.95 and an individuals unit diagnostic sensitivity 
## of 0.98. If all 30 unit tests return a negative result, what is the expected 
## design prevalence for each herd? 

round(rsu.pstar(N = c(100, 500, 1000, 5000), n = 30, 
   se.p = 0.95, se.u = 0.98), digits = 3)

## The expected herd level design prevalence ranges from 0.086 (for a 100 
## cow herd) to 0.102 (for a 5000 cow herd).

epiR

Tools for the Analysis of Epidemiological Data

v2.0.19
GPL (>= 2)
Authors
Mark Stevenson <mark.stevenson1@unimelb.edu.au> and Evan Sergeant <evansergeant@gmail.com> with contributions from Telmo Nunes, Cord Heuer, Jonathon Marshall, Javier Sanchez, Ron Thornton, Jeno Reiczigel, Jim Robison-Cox, Paola Sebastiani, Peter Solymos, Kazuki Yoshida, Geoff Jones, Sarah Pirikahu, Simon Firestone, Ryan Kyle, Johann Popp, Mathew Jay and Charles Reynard.
Initial release
2021-01-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.