flowchart TD P1["<b>I. Reproducibility mindset</b><br/><i>why, privacy, teams</i>"] P2["<b>II. Workstation</b><br/><i>R, shell, Git, cloud</i>"] P3["<b>III. Infrastructure</b><br/><i>compendia, renv,<br/>Docker, pipelines</i>"] P4["<b>IV. Reporting</b><br/><i>Quarto</i>"] P5["<b>V. Wrangling and graphics</b><br/><i>acquire, tidy, join,<br/>query, plot, impute</i>"] P6["<b>VI. Analysis practice</b><br/><i>SAP, CDISC, tests,<br/>CI, AI, SAS</i>"] P7["<b>VII. Case studies</b><br/><i>end to end, then<br/>communicate</i>"] P8["<b>VIII. Obligations</b><br/><i>deposit it, then ask<br/>whether it misleads</i>"] P1 --> P2 --> P3 --> P4 P3 --> P5 P4 --> P6 P5 --> P6 P6 --> P7 --> P8
1 Introduction
For the things we have to learn before we can do them, we learn by doing them.
Aristotle, Nicomachean Ethics (c. 350 BCE)
1.1 What is ‘practicum’?
A practicum is a supervised, hands-on course of study. This book is a practicum in the fullest sense: it teaches skills that cannot be acquired by reading, only by doing. Every chapter closes with exercises that require the reader to sit at a keyboard and produce an artifact, whether that is a Git commit, a Docker container, or a finished analysis report.
The book is the companion to Statistical Computing in the Age of AI, the methods-focused volume. The two books cover complementary territory: the methods volume teaches what to compute and why; this volume teaches how to compute it reproducibly. That is, where the methods volume is concerned with the substance of an analysis, the present volume is concerned with the craft by which that analysis is made to survive scrutiny.
1.2 What this book covers
We begin with an account of the territory the book covers, which is the practical craft of biostatistical data analysis. The book is organized into eight parts, and every chapter belongs to one of them.
Part I, the reproducibility mindset, establishes why the rest matters: the case for reproducible analysis and what the word actually means (Chapter 2), the HIPAA obligations that constrain what may be shared and that bind you from the moment data arrive (Chapter 3), and the team norms within which all of this is practiced (Chapter 4).
Part II, the workstation, builds the environment the work happens in: R, Quarto, Git, dotfiles, and editor choice (Chapter 5), the Unix command line beneath them (Chapter 6), version control for one analyst (Chapter 7) and for a team (Chapter 8), and remote compute when the laptop is not enough (Chapter 9).
Part III, reproducible infrastructure, is the machinery that makes an analysis rebuildable: research compendia (Chapter 10), package pinning with renv (Chapter 11), environment pinning with Docker (Chapter 12), the zzcollab framework that composes them (Chapter 13), and dependency-aware pipelines (Chapter 14).
Part IV, reproducible reporting, covers the literate document that ties code to prose: Quarto (Chapter 15) and the R Markdown workflow it succeeds (Chapter 16).
Part V, data wrangling and graphics, is the daily work: getting data in from files, interfaces, and web pages (Chapter 17), the tidyverse stack (Chapter 18, Chapter 19, Chapter 20), querying databases with SQL (Chapter 21), publication-quality figures (Chapter 22), and missing data (Chapter 23).
Part VI, analysis practice, is the professional apparatus around the analysis: statistical analysis plans (Chapter 24), CDISC standards (Chapter 25), testing analytic workflows (Chapter 26), continuous integration (Chapter 27), AI-assisted coding (Chapter 28), and SAS for regulatory bridging (Chapter 29), with Python shown alongside R where the comparison instructs.
Part VII, case studies, carries two analyses end to end, a small clean one (Chapter 30) and a longitudinal clinical one (Chapter 31), then treats the communication of a finished result (Chapter 32).
Part VIII, obligations and synthesis, returns to what you owe once the work exists: the federal requirements and the mechanics of depositing the artifact (Chapter 33), the failures of inference that no amount of compliance prevents (Chapter 34), and the closing review (Chapter 35). These come last deliberately. Deposition is instruction about handing over something you have not built until now, and the ethics chapter’s argument, that the entire infrastructural apparatus of this book is orthogonal to whether an analysis misleads, can only land once that apparatus has been built.
Two appendices follow: alternative wrangling paradigms for reading code that is not tidyverse (Appendix A), and the peer-program survey on which several chapters rest their case for existing (Appendix B).
Figure 1.1 is the shape of the whole, and it is worth a moment before starting: the parts are not independent modules but a dependency chain, and a reader who skips ahead will find the later parts assuming the earlier ones.
1.3 What this book does not cover
- The statistical theory underlying specific models (linear, generalized linear, mixed, survival). For that, see the companion book Statistical Computing in the Age of AI or a standard reference.
- Experimental design, sample-size calculation, or causal inference beyond what is needed to execute an analysis plan.
- Specialized computing platforms (Bioconductor, Stan, deep-learning frameworks) beyond brief mention.
- The algorithms of computational statistics: numerical optimization, Monte Carlo and simulation design, the bootstrap, and Bayesian computation. These dominate many peer statistical-computing courses; here they are the territory of the companion volume, and we treat their absence as deliberate rather than accidental.
- Statistical theory in any depth.
The trade-off is deliberate. On the one hand, a deeper treatment of any single method would merit a volume of its own; on the other, the analyst who cannot move a finished analysis through the full workflow is poorly served by depth alone. We have therefore aimed for breadth across the workflow rather than depth on any one method.
1.4 Who this book is for
The intended reader is a graduate student or early-career biostatistician who has working R fluency and is now learning to operate professionally: that is, working on teams, satisfying regulatory requirements, and producing reproducible artifacts that survive peer review.
We assume the following of the reader:
- R proficiency at the level of R for Data Science (Wickham and Grolemund).
- Familiarity with statistical methods at the master’s level (linear and generalized linear models, basic survival, regression diagnostics).
- Comfort with the command line and basic file- system operations.
We do not, on the other hand, assume any of the following:
- Prior Git, Docker, or
renvexperience. - Prior collaboration with clinical investigators.
- Experience with regulatory or industry-sponsored research.
1.5 How to read this book
For each chapter, the workflow we recommend is the following:
- Read the chapter through once, without running code. Notice the structure: an opening quiz, learning objectives, the statistician’s-contribution section, the technical sections, the LLM callouts, the exercises.
- Replicate the examples in your own environment. Type, do not copy-paste. The typing forces you to read each character; the copy-paste does not.
- Do the exercises without consulting an LLM. The cognitive cost of producing the answer yourself is, it appears, part of the learning.
- Extend by pasting the AI-assisted practice prompts (the ‘Collaborating with an LLM’ callouts) into an LLM and critiquing the responses against your own work.
The book is, we grant, somewhat dense. Reading two chapters per week is a sustainable pace, and covering it in a quarter or trimester is realistic. We would emphasize that the exercises are the work; the chapters are merely the scaffolding.
1.6 The chapter pattern
We note that every chapter follows the same structure:
- Prerequisites quiz. Three open-ended questions, in the style of Advanced R (Wickham, 2019). Answer them honestly; if all three are easy, you can bypass the chapter. Answers appear in the Prerequisites-answers section at the end.
- Learning objectives. What you will be able to do.
- Orientation. A short prose framing of the topic.
- The statistician’s contribution. What no tool can automate. The judgments that distinguish defensible practice from rote use.
- Technical sections. The how-to.
- Worked examples. Code that demonstrates the chapter’s tools on a realistic problem.
- Collaborating with an LLM. Prompts that work, what to watch for, how to verify.
- Principle in use. Three habits the chapter has been building toward.
- Exercises. The work.
- Further reading. Where to go next on this topic.
- Prerequisites answers. End of chapter.
The pattern is repeated deliberately. By the third chapter, the reader will know where to find each component.
1.7 On the Age-of-AI framing
The companion textbook is titled Statistical Computing in the Age of AI. This Practicum is named for its content (Biostatistics Practicum) rather than the AI framing, but the framing is present throughout: every chapter has a ‘Collaborating with an LLM’ section showing how to use AI assistance for the chapter’s tools, and Chapter 28 is the meta-chapter on AI-assisted coding more generally.
The position the books take is consistent: large language models are an amplifier of analyst productivity, not a replacement for analyst judgment. We argue this position by demonstration rather than by assertion. The reader is encouraged to use the AI assistance the book describes, to verify it the way the book describes, and to form his or her own view.
1.8 What this book is, in three sentences
This is a graduate practicum in the daily craft of biostatistical data analysis. It comprises eight parts: the reproducibility mindset, the workstation, reproducible infrastructure, reproducible reporting, data wrangling and graphics, analysis practice, case studies, and the obligations that attach to a finished analysis. The test of the book, in our view, is whether, after working through it, the reader can produce a reproducible, defensible analysis on a real biomedical question with an interdisciplinary team, using AI assistance without being misled by it.
Good luck.