HM Treasury Magenta Book Policy Evaluation Primitives
Overview
Implements policy evaluation primitives from HM Treasury Magenta Book guidance (HM Treasury, 2026): theory of change and log-frame construction, evaluation planning and stakeholder mapping, power and minimum-detectable-effect calculations for randomised designs (including cluster and stepped-wedge designs following Hussey and Hughes (2007) doi:10.1016/j.cct.2006.05.007 and Hemming et al. (2015) doi:10.1136/bmj.h391), Maryland Scientific Methods Scale ratings, structured confidence ratings, light-weight difference-in-differences and interrupted-time-series estimators (Bernal et al. (2017) doi:10.1093/ije/dyw098) with cluster-robust standard errors (Cameron and Miller (2015) doi:10.3368/jhr.50.2.317), pre-treatment balance checks (Stuart (2010) doi:10.1214/09-STS313), and cost-effectiveness analysis (cost per outcome, incremental cost-effectiveness ratio, acceptability curves, incremental net benefit, quality-adjusted and disability-adjusted life years). Designed as the evaluation companion to the appraisal package 'greenbook'. Bundled rubric and reference tables carry vintage metadata for reproducibility. Aligned with the May 2026 republication of the Magenta Book.
- Aligned with the May 2026 republication of the HM Treasury Magenta Book. Every
@referencesblock now cites the 2026 edition, with pointers to the relevant chapter in the main book and section in Annex A: Analytical methods for use within an evaluation. No API changes. DESCRIPTION, package-level documentation, andinst/CITATIONupdated to the 2026 edition.README.mdupdated: new alignment banner; "current edition" line updated; Source documents section now points at the main Magenta Book, Annex A, and the Test and Learn annex.- Vintage refreshed in
inst/extdata/data_versions.csv(rebuilt fromdata-raw/data_versions.R);last_updatednow2026-05-19.
Show all changes in 0.1.1Hide the rest of the changes in 0.1.1
CITATION.cffbumped to 0.1.1 /2026-05-19.- Coverage of new 2026 content (Test and Learn annex, value-for-money expansion, place-based evaluation, AI in evaluation, research transparency / TIGER) is planned in subsequent releases.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK7 OK2026-04-30
Documentation
- Help pages
- 36 (1 internal)includes a package overview page
- Examples that run
- 94%33 run in a plain check · 2 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 100%
- Documented parameters
- 95%
- Return-value docs
- 100%
- Help pages citing references
- 58%
Downloads
Repository
5 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/charlescoverdale/magentabook on 2026-10-18.
Dependencies
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 0.1.1Latest
- 0.1.02026-04-29
- RR 4.6.0 released · 2026-04-24
Package metadata
- First published
- 2026-04-29
- Total releases
- 2 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Download size
- 117 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("magentabook")The package provides a citation file that builds its entry when R runs it. Run citation() to see it.
The repository also keeps a CITATION.cff.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.