Skip to content

magentabook

0.1.1Package record

HM Treasury Magenta Book Policy Evaluation Primitives

0packages depend
1.9Kdownloads / year
88.3%test coverage
13/13flavors OK

Overview

About

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.

Changes in 0.1.1
  • Aligned with the May 2026 republication of the HM Treasury Magenta Book. Every @references block 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, and inst/CITATION updated to the 2026 edition.
  • README.md updated: 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 from data-raw/data_versions.R); last_updated now 2026-05-19.
Show all changes in 0.1.1Hide the rest of the changes in 0.1.1
  • CITATION.cff bumped 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

CRAN checks
13OK
Slowest check: 2.3 min · r-release-macos-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK7 OK2026-04-30
Advisories

none known

Documentation

In release 0.1.1
READMEYes · 1,837 wordsVignettesYes · 2 · dynamicNEWSYes · 100% structured · mentions 0.1.1Citation fileYes · computed when R runs itWebsitenot declared in DESCRIPTION
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

1.9K
CRAN downloads in the past year
Rank #13,782 · ~5/day · ~155/mo
Daily download trend is not available in this view yet.
32930 days
84790 days
1.9K1 year
Compare downloads with other packages →
Also on44 r2u4 autocran

Repository

0Stars
0Forks
0Open issues
0Open PRs
0Releases
Last activity 2026-09-19
Responsiveness
not measured
PracticesBeta

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.

Reproducibility and dev environment (1)
data-raw/
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Research and citation (1)
CITATION.cff
For agents and models (1)
llms.txt
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
12 external dependencies (excludes base and recommended)

Installing magentabook adds 1 package (1 with compiled code, 629 KB of source tarballs). Heaviest: cli 629 KB.

Depends (1)
R >= 4.1.0
Imports (3)
clistatsutils
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (1)
Author, Maintainer since 0.1.0 (2026)
Releases (2)

Pick two releases to compare their code metrics.

  • 0.1.1Latest
    record
    2026-09-08 · current release · diff ↗
  • 0.1.0
    record
    2026-04-29
  • R
    R 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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for magentabook version 0.1.1 [Data set]. HJJB, LLC. Data release v2026-10-22. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy