# Population level (or herd/flock) sensitivity using pooled sampling

This utility calculates a population or cluster level sensitivity for a survey where pooled sammpling has been used. This is the probability (or level of confidence) that one or more pools will give a positive result assuming the disease was present at a prevalence greater than or equal to the specified design prevalence. It is assumed that individual units (animals) are sampled and that samples are combined at random into a specified number of pools of equal size. Test sensitivity and specificity are measured at the pool level, allowing for any dilution effect.

For more details see: Christensen & Gardner (2000). Herd-level interpretation of test results for
epidemiologic studies of animal diseases. Prev Vet Med. **45**:83-106.

### Inputs are:

- Design prevalence as a proportion;
- Pool sensitivity;
- Pool specificity;
- Pool size - the number of units represented in each pooled sample; and
- The number of pools tested.

### Outputs are:

- Population-level sensitivity for the given pool size, number of pools, design prevalence and pool sensitivity and specificity.

No results

No example available

No references available

################################################################ # program to calculate population-level sensitivity using pooled sampling ################################################################ # uses RSurveillance package rm(list = ls()) test<- ifelse(length(commandArgs()) < 3, TRUE, FALSE) fpath<- ifelse(test, "webRootUrl", "rtoolsPath") # load header scripts source(paste(fpath, "R/epi_head.R", sep = "")) source(paste(fpath, "R/HTMLStream.R", sep = "")) source(paste(fpath, "R/epitools_functions.r", sep = "")) # extract command arguments # pstar, sens, r, k a1<- type.convert(a0[8:12]) # initialise variables pstar<- a1[1] Sens<- a1[2] sp<- a1[3] r<- a1[4] k<- a1[5] digits<- 4 filename<- digest(Sys.time) graphfile<- paste(fpath, "tmp/", filename, ".png", sep="") sinkfile<- paste(fpath, "tmp/", filename, ".txt", sep="") # table of inputs inputs<- array("", dim = c(length(a1), 1)) inputs[, 1]<- a1 rownames(inputs)<- c("Design prevalence (Pstar)", "Pool-level sensitivity","Pool-level specificity","Number of pools", "Pool size") result<- sep.pooled(r, k, pstar, Sens, sp) seh<- round(result[[1]], digits) results1<- rbind(inputs, "Population sensitivity" = seh, "Population specificity" = round(result[[2]], digits)) # write to html and file heading<- "Population or Cluster level sensitivity with pooled testing" subheadings<- "" tmp.file<- paste(fpath, "tmp/", filename, sep = "") output<- html.output(heading, subheadings, "", results = list(results1), graphs = "", graph.headings = "", show.inputs = F, show.graphs = F, tmp.file, result.txt = "") write.html(output, tmp.file) cat(output)