Package: DRpower 1.0.4

Bob Verity

DRpower: Study design and analysis for pfhrp2/3 deletion prevalence studies

This package can be used in the design and/or analysis stages of Plasmodium falciparum pfhrp2/3 deletion prevalence studies. We assume that the study takes the form of a clustered prevalence survey, meaning the data consists of a numerator (number of deletions found) and denominator (number tested) over multiple clusters. We are interested in estimating the study-level prevalence, i.e. over all clusters, while accounting for the possibility of high intra-cluster correlation. The analysis approach uses a Bayesian random effects model to estimate prevalence and intra-cluster correlation. The approach to power analysis is simulation-based, running the analysis many times on simulated data and estimating empirical power. This method can be used to establish a minimum sample size required to achieve a given target power. The package also includes functions for more general power and sample size calculation, including presence/absence and margin of error based approaches.

Authors:Bob Verity [aut, cre], Shazia Ruybal [aut]

DRpower_1.0.4.tar.gz
DRpower_1.0.4.zip(r-4.7)DRpower_1.0.4.zip(r-4.6)DRpower_1.0.4.zip(r-4.5)
DRpower_1.0.4.tgz(r-4.6-x86_64)DRpower_1.0.4.tgz(r-4.6-arm64)DRpower_1.0.4.tgz(r-4.5-x86_64)DRpower_1.0.4.tgz(r-4.5-arm64)
DRpower_1.0.4.tar.gz(r-4.7-arm64)DRpower_1.0.4.tar.gz(r-4.7-x86_64)DRpower_1.0.4.tar.gz(r-4.6-arm64)DRpower_1.0.4.tar.gz(r-4.6-x86_64)
DRpower_1.0.4.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION
card.svg |card.png
DRpower/json (API)

# Install 'DRpower' in R:
install.packages('DRpower', repos = c('https://plasmogenepi.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/mrc-ide/drpower/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • df_sim - Summary of simulations from the threshold analysis
  • df_ss - Minimum sample sizes for the threshold analysis
  • historical_data - Data from historical pfhrp2 studies that passed filters for inclusion into an ICC analysis.

On CRAN:

Conda:

cpp

4.86 score 2 stars 52 scripts 18 exports 35 dependencies

Last updated from:133243fdbe. Checks:13 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-arm64OK180
linux-devel-x86_64OK190
source / vignettesOK354
linux-release-arm64OK174
linux-release-x86_64OK180
macos-release-arm64OK133
macos-release-x86_64OK290
macos-oldrel-arm64OK112
macos-oldrel-x86_64OK251
windows-develOK162
windows-releaseOK181
windows-oldrelOK159
wasm-releaseOK125

Exports:%>%check_DRpower_loadedget_ICCget_jointget_marginget_margin_Bayesianget_margin_CPget_power_presenceget_power_thresholdget_prevalenceget_sample_size_marginget_sample_size_margin_CPget_sample_size_presenceget_sample_size_tableplot_ICCplot_jointplot_powerplot_prevalence

Dependencies:clicpp11dplyrextraDistrfarvergenericsggplot2gluegtableisobandknitrProgressBarlabelinglifecyclemagrittrpillarpkgconfigpurrrR.methodsS3R.ooR6RColorBrewerRcppRcppArmadillorlangS7scalesstringistringrtibbletidyrtidyselectutf8vctrsviridisLitewithr

Designing a study
1. Consult sample size tables | 2. Consult power curves | 3. Refine sample sizes | 4. Account for dropout | 5. Iterate and improve | 6. Detecting rare variants (bonus section) | 7. Controling the margin of error (bonus section)

Last update: 2025-07-24
Started: 2023-05-25

Mathematical Details
1. The Bayesian hierarchical model

Last update: 2025-07-24
Started: 2023-07-25

The DRpower model
5. A Bayesian approach

Last update: 2025-07-24
Started: 2023-07-25

Installation
Installing via the plasmogenepi R-universe | Installing Rcpp | Installing and loading DRpower

Last update: 2023-12-12
Started: 2023-05-25

Power and Sample Size in the DRpower Model
8. Estimating power via simulation | 8.1. Sample size calculation | 8.2. How to choose final sample sizes

Last update: 2023-12-10
Started: 2023-07-25

Historical analysis
1. Available data on pfhrp2/3 deletions | 2. Estimating the ICC

Last update: 2023-12-10
Started: 2023-07-25

Analysing data
1. Estimate prevalence | 2. Compare prevalence against a threshold | 3. Estimate the ICC

Last update: 2023-11-30
Started: 2023-05-25

Background
What are pfhrp2/3 deletions? | What are we doing about it? | What does the 2020 Master Protocol recommend? | How does the DRpower method fit in? | Defining our terms

Last update: 2023-11-30
Started: 2023-05-25

CIs and Overdispersion
2. Why is this a tricky problem? | 2.1 Dealing with overdispersion

Last update: 2023-11-30
Started: 2023-05-25

How to Summarise the Prevalence
1. Is our Bayesian method biased?

Last update: 2023-11-30
Started: 2023-07-25

Sample Size Calculation in the 2020 WHO Master Protocol
6. The 2020 WHO Master Protocol | 6.1. The logic behind the sample size calculation | 6.2. Working through the updated protocol numbers | 6.3. Issues with the approach | References

Last update: 2023-11-30
Started: 2023-07-25

The Design Effect
3. What is the design effect? | 3.1 The effective sample size | 3.2 Relating $D_{eff}$ to the ICC

Last update: 2023-11-30
Started: 2023-05-25

The One-sample Z-test
7. Power and sample size under the z-test

Last update: 2023-11-30
Started: 2023-07-25

Weaknesses with the CI-based Approach
4. What's the problem?

Last update: 2023-11-30
Started: 2023-05-25