Contents
Every part and chapter of the book on one page, in reading order, each chapter with a one-line summary.
Part I. Why and With Whom
- 2 Why Reproducible Research
Distinguishes methods, results, and inferential reproducibility, and names the check that makes each common failure loud. - 3 Team Science for Biostatisticians
Runs the intake conversation, places an engagement on the collaboration spectrum, and settles authorship. - 4 De-identification and Data Ethics
Sets out the HIPAA de-identification pathways, what each costs the analysis, and the obligations that survive de-identification.
Part II. Your Toolkit
- 5 The Unix Shell
Teaches the Unix shell: moving around the filesystem, inspecting a raw file before R reads it, and composing pipelines. It is optional. Later chapters give the few commands they need in full, and a reader who has used a terminal can skip it. - 6 Setting Up Your Workstation
Installs R, an IDE, Quarto, and Git, and verifies the machine with a checklist. - 7 Git and GitHub for Solo Developers
Introduces Git and GitHub for a single analyst who wants a recoverable history. - 8 Git for Teams
Extends that history to a team: branches, pull requests, review, and conflicts. - 9 renv for Package Management
Records the package versions an analysis uses in a lockfile and restores them elsewhere. - 10 Docker for Reproducibility
Pins the R version, operating system, and system libraries in a container. - 11 Assembling the Compendium
Assembles Git,renv, and Docker into a research compendium and audits it against the Five Pillars. - 12 AI-Assisted Coding
Sets out how to prompt language models and coding agents, how to check what they produce, and what may be sent to them. It comes before the chapters in which you rely on them.
Part III. Data in Hand
- 13 Getting Data In: Files
Reads a clinical export with a full column specification and asserts against its usual pathologies. - 14 APIs, Scraping, and Freezing What You Receive
Queries web interfaces withhttr2and freezes what was received. - 15 Data Wrangling Essentials
Recodes per-site conventions and reports how many rows each step removes. - 16 Factors, Strings, and Dates
Handles factors, free-text strings, and dates. - 17 Writing and Debugging Functions
Turns a repeated cleaning step into a tested function, and shows how to find the cause when one misbehaves. - 18 Joining and Reshaping
Predicts and checks the row count of every join. - 19 Databases and SQL for Biostatisticians
Queries a database with SQL anddbplyr. It is optional. Read it when your data live in a database rather than in exported files. - 20 Plotting with ggplot2 and purrr
Builds figures withggplot2and many figures at once withpurrr. - 21 Missing Data: Diagnosis, Imputation, Reporting
Diagnoses missing data, imputes it withmice, and runs a sensitivity analysis. - 22 De-identification in Practice
Applies the rules of 4 De-identification and Data Ethics to a release, with assertions that fail if an identifier survives.
Part IV. Documents and Pipelines
- 23 Reproducible Reports with Quarto
Writes the analysis as a Quarto document whose numbers are computed rather than typed. - 24 Reproducible Pipelines with targets
Turns the analysis into a pipeline that rebuilds only what an edit has invalidated. - 25 Cloud Compute and Remote Servers
Moves a job to a cluster or a cloud instance when a laptop is not enough.
Part V. Analysis Practice
- 26 Statistical Analysis Plans
States the estimand, writes the statistical analysis plan and the data management and sharing plan, and uses a Git tag to show that the plan preceded the data. - 27 Testing and Continuous Integration
Writestinytesttests that assert values rather than shapes, and runs them on every push with GitHub Actions.
Part VI. Industry
- 28 Clinical Data Standards: CDISC, SDTM, and ADaM
Traces a trial’s data from the case report form through SDTM and ADaM to the tables of a clinical study report, and derives two ADaM datasets in R. - 29 SAS for R Programmers
Teaches enough SAS to read a program and its log, write the R equivalent, and predict where the two fits of one model will disagree.
Part VII. Analysis to Audience
- 30 Case Study: Palmer Penguins
Works a complete analysis on the Palmer penguins data and maps each step to the chapter that taught it. - 31 Case Study: ADNI MCI Prediction
Works a harder case, prediction of conversion from mild cognitive impairment, with data held under a data-use agreement. - 32 Ethics Beyond Compliance
Argues that the reproducibility tools of this book cannot on their own keep an analysis from misleading its readers, and names the practices that can. - 33 Communicating a Finished Analysis
Writes the answer-first memo and the response to reviewers. - 34 Federal Requirements and Deposition
Covers federal public-access requirements and the deposit of each artifact in a repository.
Part VIII. Capstone
- 35 Capstone: HF-HOME from Export to Deposit
Takes the HF-HOME study from a multi-site case-report-form export to a deposited compendium with a tagged analysis plan, executed tests, continuous integration, a one-page memo, and a response to a reviewer. It is graded on the numbered habits of The habits this book teaches rather than on the estimate.