Example Data Sets for Causal Inference Textbooks
Overview
Example data sets to run the example problems from causal inference textbooks. Currently, contains data sets for Huntington-Klein, Nick (2021 and 2025) "The Effect" https://theeffectbook.net, first and second edition, Cunningham, Scott (2021 and 2025, ISBN-13: 978-0-300-25168-5) "Causal Inference: The Mixtape", and Hernán, Miguel and James Robins (2020) "Causal Inference: What If" https://www.hsph.harvard.edu/miguel-hernan/causal-inference-book/.
- Added ccdrug data.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-07-16
- WARNING12 OK, 1 WARNING2026-07-15
- OK14 OK2026-03-10
Documentation
- Help pages
- 35 (1 internal)includes a package overview page
- Examples that run
- no examples
- Exported functions with examples
- not tracked
- Documented parameters
- not tracked
- Return-value docs
- not tracked
- Help pages citing references
- 94%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 6
- Median days to close, 50 most recently updated closed PRs
- 1
Stars over time
Forks over time
Issues over time
PRs over time
Checks run against github.com/nickch-k/causaldata on 2026-10-21.
No development-tooling practices detected in the upstream repository.
Dependencies
Installing causaldata adds 10 packages (7 with compiled code, 4.0 MB of source tarballs). Heaviest: vctrs 1.0 MB, rlang 766 KB, cli 629 KB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 0.1.4Latest
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- 0.1.32021-12-01 · diff ↗
- 0.1.12021-05-20
- RR 4.1.0 released · 2021-05-18
Package metadata
- First published
- 2021-05-20
- Total releases
- 3 / 5 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 2.10
- Bundled data
- 2.0 MB / 34 files
- Download size
- 2.1 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("causaldata")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.