Speaker
Description
In methodology reports and academic textbooks, sampling designs are described in a structured way, with an explicit logic connecting strata, clusters, sampling stages, and selection probabilities. This structure is often lost in the R code that implements it, where the design gets scattered across intermediate objects, successive calls, and technical details. The more complex the plan, the wider the gap, making code harder to read, verify, and maintain.
samplyr was built to close this gap. The package provides a declarative grammar inspired by the tidy ecosystem, where each verb maps to a sampling operation: sampling_design() to initiate a plan, stratify_by() to stratify and allocate, cluster_by() to define clusters, draw() to specify method and size, add_stage() to chain stages, and execute() to draw the sample from a frame. Complex sampling designs are expressed in code that is more structured, more readable, and closer to the statistical reasoning behind them.
The talk will illustrate this approach using several types of designs common in official statistics and applied surveys. We will show how a more explicit expression of the design can improve reproducibility, reduce implementation errors, and smooth the transition from design to sampling to analysis with survey. Born from field experience on national surveys in West and Central Africa, samplyr aims to make sampling code read the way sampling designs are written.
Link: https://dickoa.gitlab.io/samplyr/
If you used AI tools or services to support the preparation of this submission, please state the name and reason for using each of them.
Proofread and correct typos
| Keywords: Please list up to 5 keywords to help us find the right session for your contribution. | survey sampling, tidy design, reproducibility, teaching |
|---|---|
| Virtual Option | This submission is for onsite presentation only |
| Material License | CC-BY-4.0 |
| Video Recording | Video sharing is fine |
| The author(s) agree(s) to take responsibility and be accountable for the contents of the submission and is/are authorized to present it. | Confirm |
| Interested in serving as reviewer? | mail@ahmadoudicko.com |