magentabook: HM Treasury Magenta Book Policy Evaluation Primitives

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.

Version: 0.1.1
Depends: R (≥ 4.1.0)
Imports: cli (≥ 3.6.0), stats, utils
Suggests: testthat (≥ 3.0.0), knitr, rmarkdown, openxlsx, officer, flextable, pwr, sandwich, swCRTdesign, BCEA, cobalt
Published: 2026-09-08
DOI: 10.32614/CRAN.package.magentabook
Author: Charles Coverdale [aut, cre]
Maintainer: Charles Coverdale <charlesfcoverdale at gmail.com>
BugReports: https://github.com/charlescoverdale/magentabook/issues
License: MIT + file LICENSE
URL: https://github.com/charlescoverdale/magentabook
NeedsCompilation: no
Language: en-US
Citation: magentabook citation info
Materials: README, NEWS
CRAN checks: magentabook results

Documentation:

Reference manual: magentabook.html , magentabook.pdf
Vignettes: Cost-effectiveness with magentabook and greenbook (source, R code)
Designing a Magenta Book evaluation (source, R code)

Downloads:

Package source: magentabook_0.1.1.tar.gz
Windows binaries: r-devel: magentabook_0.1.0.zip, r-release: magentabook_0.1.1.zip, r-oldrel: magentabook_0.1.0.zip
macOS binaries: r-release (arm64): magentabook_0.1.0.tgz, r-oldrel (arm64): magentabook_0.1.0.tgz, r-release (x86_64): magentabook_0.1.1.tgz, r-oldrel (x86_64): magentabook_0.1.1.tgz
Old sources: magentabook archive

Linking:

Please use the canonical form https://CRAN.R-project.org/package=magentabook to link to this page.

mirror server hosted at Truenetwork, Russian Federation.