Skip to content

PoolTestR

0.2.0Package record

Prevalence and Regression for Pool-Tested (Group-Tested) Data

0packages depend
3.4Kdownloads / year
–test coverage
0/13flavors OK

Overview

About

An easy-to-use tool for working with presence/absence tests on 'pooled' or 'grouped' samples. The primary application is for estimating prevalence of a marker in a population based on the results of tests on pooled specimens. This sampling method is often employed in surveillance of rare conditions in humans or animals (e.g. molecular xenomonitoring). The package was initially conceived as an R-based alternative to the molecular xenomonitoring software, 'PoolScreen' https://sites.uab.edu/statgenetics/software/. However, it goes further, allowing for estimates of prevalence to be adjusted for hierarchical sampling frames, and perform flexible mixed-effect regression analyses (McLure et al. Environmental Modelling and Software. DOI:10.1016/j.envsoft.2021.105158). The package is currently in early stages, however more features are planned or in the works: e.g. adjustments for imperfect test specificity/sensitivity, functions for helping with optimal experimental design, and functions for spatial modelling.

Changes in 0.2.0

Caitlin Cherryh has joined the development team and has been working on

improving readability of outputs, documentation, and testing.

This update includes an option for PoolPrev() to skip the calculation of

Bayesian estimates. When using bayesian = FALSE, only MLE and likelihood ratio

confidence intervals will be calculated, substantially speeding up this function

(perhaps x100).

This updates also removes one source of bias from prevalence estimates returned

for any hierarchical models. This effects the results of HierPoolPrev() and

getPrevalence() applied to models with random effects. Under the update,

prevalence estimates will typically slightly increase, though the difference

will not be notable if the sample size is large and there is little clustering.

Previous estimates of prevalence did not marginalise out the random effects when

Show all changes in 0.2.0Hide the rest of the changes in 0.2.0

calculating population-level prevalence, but as of this version, random effects

are marginalised out. Due to the complexity introduced by this bias-correction

we now longer-support specifying nested surveys using ~(1|Layer1/Layer2) and

recommend using the format ~(1|Layer1) + (1|Layer2) which should be equivalent

as long as each level in Layer2 is unique --- i.e. the format already required

for HierPoolPrev().

Due to the complexity introduced by this bias-correction, the way of specifying

priors for HierPoolPrev() has been updated. Priors for HierPoolPrev() are

now directly on the real-scale (logit-transformed) parameters, rather than

prevalence directly. We have also updated the default priors for PoolRegBayes()

for regression parameters, as we believe the previous priors were too diffuse

(normal(0,100)). The defaults for the centered predictors are now

student(6,0,1.5).

HierPoolPrev() now has functionality to return estimate of intracluster

correlation coefficients (ICC) at one or more levels of clustering.

HierPoolPrev() and PoolPrev() now have custom output classes (inheriting

from tibble, the previous class for these outputs). This has allowed us

(Caitlin) to add pretty-print functions these outputs which are much more human

readable. Saving the output with write.csv() or similar will still return a

detailed, machine-readable output.

Both PoolPrev() and HierPoolPrev() have been updated to improve point

estimates. New default function values have been added for both PoolPrev() and

HierPoolPrev(). The default for the new robust parameter is robust = TRUE,

which means the point estimate of prevalence is the posterior median. In both

functions, the default value for all.negative.pools = 'zero', meaning when all

pools are negative, the point estimate and the. lower bound for the interval

will be 0.

From NEWS.md in the release

Install

Health

CRAN checks
13NOTE
Check messages
NOTEDESCRIPTION meta-informationr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64, r-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-oldrel-windows-x86_64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-x86_64

r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    ‘getPrevalence.R’

r-devel-windows-x86_64, r-oldrel-windows-x86_64, r-release-windows-x86_64

Missing dependency on R >= 4.1.0 because package code uses the pipe
  |> or function shorthand \(...) syntax added in R 4.1.0.
  File(s) using such syntax:
    'getPrevalence.R'
NOTEdependencies in R coder-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc
Namespaces in Imports field not imported from:
  ‘RcppParallel’ ‘rstantools’
All declared Imports should be used.

CRAN check page ↗

Slowest check: 14.6 min · r-oldrel-windows-x86_64
Status changes
  • NOTE13 NOTE2026-09-09
  • ERROR12 NOTE, 1 ERROR2026-09-04
  • NOTE13 NOTE2026-08-06
  • ERROR12 NOTE, 1 ERROR2026-07-16
  • NOTE13 NOTE2026-07-08
Show 6 earlier changesHide 6 earlier changes
  • ERROR12 NOTE, 1 ERROR2026-07-07
  • NOTE13 NOTE2026-06-09
  • ERROR12 NOTE, 1 ERROR2026-06-08
  • NOTE14 NOTE2026-04-22
  • ERROR13 NOTE, 1 ERROR2026-04-18
  • NOTE14 NOTE2026-03-10
Advisories

none known

Documentation

In release 0.2.0
READMEYes · 615 wordsVignettesNoNEWSYes · 100% structured · mentions 0.2.0Citation fileYes · cites a publicationWebsitenot declared in DESCRIPTION
Help pages
10 (1 internal)includes a package overview page
Examples that run
83%5 run in a plain check · 1 only when donttest examples are enabled (R CMD check --as-cran)
Exported functions with examples
100%
Documented parameters
91%
Return-value docs
100%
Help pages citing references
20%

Downloads

3.4K
CRAN downloads in the past year
Rank #12,198 · ~9/day · ~280/mo
Daily download trend is not available in this view yet.
32930 days
91290 days
3.4K1 year
Compare downloads with other packages →
Also on367 r2u3 autocran

Repository

7Stars
3Forks
13Open issues
0Open PRs
4Releases
272Commits
4Commit identities
272 commits · Last activity 2025-11-25 · 0% stars, 30d · Default branch at 0.2.1, ahead of CRAN 0.2.0 (checked 2026-10-21)
Responsiveness
How these are sampled
PRs merged (all time)
91%
Median days to close, 50 most recently updated closed issues
34
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-05-02 · 62026-07-07 · 7
PracticesBeta

10 development-tooling and community-health practices detected across 7 families in the upstream repository

Checks run against github.com/angusmclure/pooltestr on 2026-10-21.

Continuous integration (3)
GitHub ActionsR CMD check workflowTravis CI (config file)

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (1)
pkgdown
Coverage (1)
Coverage reporting (Codecov)
Reproducibility and dev environment (1)
data-raw/
Show all practicesHide 3 practices
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Lint, format, editor (1)
RStudio project
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
18 external dependencies (excludes base and recommended)

Installing PoolTestR adds 82 packages (39 with compiled code, 83 MB of source tarballs). Heaviest: BH 14 MB, stringi 11 MB, ggplot2 6.0 MB.

Depends (1)
R >= 3.4.0
Suggests (1)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (2)
Author, Maintainer since 0.1.0 (2021)
Contributor · added in 0.2.0
Releases (5)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • 0.2.0Latest
    record
    2024-12-05 · current release · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • 0.1.3
    record
    2022-07-01 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • 0.1.2
    record
    2022-01-19 · diff ↗
  • R
    R 4.1.0 released · 2021-05-18
  • 0.1.1
    record
    2021-02-15 · diff ↗
  • 0.1.0
    record
    2021-02-08
  • R
    R 4.0.0 released · 2020-04-24

Package metadata

First published
2021-02-08
Total releases
5 / 5 yrs
License
GPL (>= 3) OSI
Minimum R
≥ 3.4.0
Bundled data
18 KB / 3 files
Download size
80 KB

Cite

Cite this package

Run in R for the authors' entry:

citation("PoolTestR")

The package provides a citation file, so citation() returns the authors' own entry.

It points to 10.1016/j.envsoft.2021.105158.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for PoolTestR version 0.2.0 [Data set]. HJJB, LLC. Data release v2026-10-24. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy