{
  "_id": "6a1ee7feb401979e734119da",
  "Package": "magentabook",
  "Title": "HM Treasury Magenta Book Policy Evaluation Primitives",
  "Version": "0.1.1",
  "Authors@R": "person(\"Charles\", \"Coverdale\", , \"charlesfcoverdale@gmail.com\", role = c(\"aut\", \"cre\"))",
  "Description": "Implements policy evaluation primitives from HM Treasury\nMagenta Book guidance (HM Treasury, 2026): theory of change and\nlog-frame construction, evaluation planning and stakeholder\nmapping, power and minimum-detectable-effect calculations for\nrandomised designs (including cluster and stepped-wedge designs\nfollowing Hussey and Hughes (2007)\n<doi:10.1016/j.cct.2006.05.007> and Hemming et al. (2015)\n<doi:10.1136/bmj.h391>), Maryland Scientific Methods Scale\nratings, structured confidence ratings, light-weight\ndifference-in-differences and interrupted-time-series\nestimators (Bernal et al. (2017) <doi:10.1093/ije/dyw098>) with\ncluster-robust standard errors (Cameron and Miller (2015)\n<doi:10.3368/jhr.50.2.317>), pre-treatment balance checks\n(Stuart (2010) <doi:10.1214/09-STS313>), and cost-effectiveness\nanalysis (cost per outcome, incremental cost-effectiveness\nratio, acceptability curves, incremental net benefit,\nquality-adjusted and disability-adjusted life years). Designed\nas the evaluation companion to the appraisal package\n'greenbook'. Bundled rubric and reference tables carry vintage\nmetadata for reproducibility. Aligned with the May 2026\nrepublication of the Magenta Book.",
  "License": "MIT + file LICENSE",
  "Encoding": "UTF-8",
  "Language": "en-US",
  "Roxygen": "list(markdown = TRUE)",
  "RoxygenNote": "7.3.3",
  "Config/testthat/edition": "3",
  "URL": "https://github.com/charlescoverdale/magentabook",
  "BugReports": "https://github.com/charlescoverdale/magentabook/issues",
  "VignetteBuilder": "knitr",
  "Repository": "https://charlescoverdale.r-universe.dev",
  "Date/Publication": "2026-05-19 09:04:42 UTC",
  "RemoteUrl": "https://github.com/charlescoverdale/magentabook",
  "RemoteRef": "HEAD",
  "RemoteSha": "a935b2602ee3add829c5a6f9e378bf6fcee335e2",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-19 11:09:07 UTC",
    "User": "root"
  },
  "Author": "Charles Coverdale [aut, cre]",
  "Maintainer": "Charles Coverdale <charlesfcoverdale@gmail.com>",
  "MD5sum": "39ece3536bf8e20373146c2ca458dae5",
  "_user": "charlescoverdale",
  "_type": "src",
  "_file": "magentabook_0.1.1.tar.gz",
  "_fileid": "1e2744ad5f32c4f8d7057127069c7172a1ff95a271da4d188de75b6fbd6e2767",
  "_filesize": 430184,
  "_sha256": "1e2744ad5f32c4f8d7057127069c7172a1ff95a271da4d188de75b6fbd6e2767",
  "_created": "2026-05-19T11:09:07.000Z",
  "_published": "2026-06-02T14:26:06.196Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 79094053699,
      "time": 201,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7081836937"
    },
    {
      "job": 79094053258,
      "time": 154,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7081821393"
    },
    {
      "job": 79094053657,
      "time": 130,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7081862875"
    },
    {
      "job": 79094053052,
      "time": 119,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7082010443"
    },
    {
      "job": 79094052683,
      "time": 224,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7081767959"
    },
    {
      "job": 79094052418,
      "time": 141,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7360541363"
    },
    {
      "job": 79094053351,
      "time": 98,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7081802067"
    },
    {
      "job": 79094054021,
      "time": 101,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7081803030"
    },
    {
      "job": 79094053974,
      "time": 92,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7081800236"
    }
  ],
  "_buildurl": "https://github.com/r-universe/charlescoverdale/actions/runs/26093145215",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/charlescoverdale/magentabook",
  "_commit": {
    "id": "a935b2602ee3add829c5a6f9e378bf6fcee335e2",
    "author": "Charles Coverdale <charlesfcoverdale@gmail.com>",
    "committer": "Charles Coverdale <charlesfcoverdale@gmail.com>",
    "message": "Post-audit polish: complete the 2026 alignment\n\nThe first v0.1.1 commit updated everywhere \"HM Treasury (2020)\"\nappeared but didn't update everywhere it should have appeared. Audit\nidentified six gaps:\n\n- mb_did_2x2, mb_its, mb_event_study had no Magenta Book references\n  at all. Annex A explicitly names difference-in-difference (A2.7)\n  and interrupted time series (A2.4); event study is a time-resolved\n  generalisation of A2.7. All three now cite the relevant section.\n- mb_sms_rate over-cited: the 2026 republication does not name the\n  Maryland Scientific Methods Scale anywhere in the main book or\n  Annex A. The rubric remains widely used across UK What Works\n  Centres (EEF, College of Policing, Justice Data Lab, Early\n  Intervention Foundation) but the citation must be honest about\n  this. Sherman (1997) is now the primary citation; the Magenta Book\n  reference notes that the scale is not named in 2026 but that\n  general method selection is in Chapter 3 and Annex A. README\n  provenance row updated to match.\n- mb_balance_table cited Section A2 generically; balance diagnostics\n  are specifically an A2.2 (propensity score matching) concern.\n- mb_counterfactual cited A1 + A2; counterfactuals are a quasi-\n  experimental construct, so the A1 (theory-based) reference was\n  over-broad and is removed.\n- mb_logframe @description claimed \"the canonical Magenta Book\n  logframe\", but the 2026 edition uses \"logic model\" (4 main + 2\n  annex hits) and never \"logframe\" (0 hits). Reworded to note that\n  the function produces the DFID / FCDO / EU tabular logframe layout\n  while the underlying flow is the 2026 logic model.\n- DESCRIPTION abstract did not say \"May 2026 republication\"\n  explicitly. Added a closing sentence.\n- inst/CITATION footer reworded to lead with 2026 republication\n  alignment context and to list both the main book and Annex A as\n  the primary HM Treasury references.\n\nR CMD check: 0/0/1 (time-verification only).\n",
    "time": 1779181482
  },
  "_maintainer": {
    "name": "Charles Coverdale",
    "email": "charlesfcoverdale@gmail.com",
    "login": "charlescoverdale",
    "linkedin": "in/charlescoverdale",
    "twitter": "@cfcoverdale",
    "description": "economics | climate science | R",
    "uuid": 21993492
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.1.0",
      "role": "Depends"
    },
    {
      "package": "cli",
      "version": ">= 3.6.0",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "utils",
      "role": "Imports"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "openxlsx",
      "role": "Suggests"
    },
    {
      "package": "officer",
      "role": "Suggests"
    },
    {
      "package": "flextable",
      "role": "Suggests"
    },
    {
      "package": "pwr",
      "role": "Suggests"
    },
    {
      "package": "sandwich",
      "role": "Suggests"
    },
    {
      "package": "swCRTdesign",
      "role": "Suggests"
    },
    {
      "package": "BCEA",
      "role": "Suggests"
    },
    {
      "package": "cobalt",
      "role": "Suggests"
    }
  ],
  "_owner": "charlescoverdale",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-18",
      "n": 10
    },
    {
      "week": "2026-19",
      "n": 1
    },
    {
      "week": "2026-21",
      "n": 2
    }
  ],
  "_tags": [],
  "_stars": 0,
  "_contributors": [
    {
      "user": "charlescoverdale",
      "count": 13,
      "uuid": 21993492
    }
  ],
  "_userbio": {
    "uuid": 21993492,
    "type": "user",
    "name": "Charles Coverdale",
    "description": "economics | climate science | R"
  },
  "_downloads": {
    "count": 308,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/magentabook"
  },
  "_devurl": "https://github.com/charlescoverdale/magentabook",
  "_searchresults": 0,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/magentabook.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/charlescoverdale/magentabook",
  "_realowner": "charlescoverdale",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.1.0",
      "date": "2026-04-29"
    }
  ],
  "_exports": [
    "mb_assumptions",
    "mb_balance_table",
    "mb_cea",
    "mb_ceac",
    "mb_cluster_design",
    "mb_cmo",
    "mb_confidence",
    "mb_confidence_summary",
    "mb_contribution_claim",
    "mb_counterfactual",
    "mb_daly",
    "mb_data_versions",
    "mb_did_2x2",
    "mb_evaluation_plan",
    "mb_evaluation_report",
    "mb_event_study",
    "mb_icc_reference",
    "mb_icer",
    "mb_inb",
    "mb_its",
    "mb_logframe",
    "mb_mde",
    "mb_power",
    "mb_qaly",
    "mb_questions",
    "mb_sample_size",
    "mb_schedule_table",
    "mb_sms_explain",
    "mb_sms_rate",
    "mb_stakeholders",
    "mb_stepped_wedge",
    "mb_theory_of_change",
    "mb_to_excel",
    "mb_to_latex",
    "mb_to_word"
  ],
  "_help": [
    {
      "page": "mb_assumptions",
      "title": "Build a structured assumption register",
      "concept": [
        "theory of change"
      ],
      "topics": [
        "mb_assumptions"
      ]
    },
    {
      "page": "mb_balance_table",
      "title": "Pre-treatment balance table",
      "concept": [
        "planning"
      ],
      "topics": [
        "mb_balance_table"
      ]
    },
    {
      "page": "mb_cea",
      "title": "Cost per unit of outcome",
      "concept": [
        "cost-effectiveness"
      ],
      "topics": [
        "mb_cea"
      ]
    },
    {
      "page": "mb_ceac",
      "title": "Cost-effectiveness acceptability curve",
      "concept": [
        "cost-effectiveness"
      ],
      "topics": [
        "mb_ceac"
      ]
    },
    {
      "page": "mb_cluster_design",
      "title": "Cluster-RCT design effect",
      "concept": [
        "power"
      ],
      "topics": [
        "mb_cluster_design"
      ]
    },
    {
      "page": "mb_cmo",
      "title": "Context-mechanism-outcome (CMO) configuration",
      "concept": [
        "realist"
      ],
      "topics": [
        "mb_cmo"
      ]
    },
    {
      "page": "mb_confidence",
      "title": "Structured Magenta Book confidence rating",
      "concept": [
        "confidence"
      ],
      "topics": [
        "mb_confidence"
      ]
    },
    {
      "page": "mb_confidence_summary",
      "title": "One-page confidence summary across multiple ratings",
      "concept": [
        "confidence"
      ],
      "topics": [
        "mb_confidence_summary"
      ]
    },
    {
      "page": "mb_contribution_claim",
      "title": "Contribution-analysis claim",
      "concept": [
        "realist"
      ],
      "topics": [
        "mb_contribution_claim"
      ]
    },
    {
      "page": "mb_counterfactual",
      "title": "Define a counterfactual",
      "concept": [
        "planning"
      ],
      "topics": [
        "mb_counterfactual"
      ]
    },
    {
      "page": "mb_daly",
      "title": "Disability-adjusted life years (DALYs) accumulator",
      "concept": [
        "cost-effectiveness"
      ],
      "topics": [
        "mb_daly"
      ]
    },
    {
      "page": "mb_data_versions",
      "title": "Vintage of bundled rubric and reference tables",
      "concept": [
        "lookups"
      ],
      "topics": [
        "mb_data_versions"
      ]
    },
    {
      "page": "mb_did_2x2",
      "title": "Canonical 2x2 difference-in-differences estimator",
      "concept": [
        "estimators"
      ],
      "topics": [
        "mb_did_2x2"
      ]
    },
    {
      "page": "mb_evaluation_plan",
      "title": "Aggregate evaluation plan",
      "concept": [
        "planning"
      ],
      "topics": [
        "mb_evaluation_plan"
      ]
    },
    {
      "page": "mb_evaluation_report",
      "title": "Aggregate evaluation report",
      "concept": [
        "reporting"
      ],
      "topics": [
        "mb_evaluation_report"
      ]
    },
    {
      "page": "mb_event_study",
      "title": "Simple event-study coefficients",
      "concept": [
        "estimators"
      ],
      "topics": [
        "mb_event_study"
      ]
    },
    {
      "page": "mb_icc_reference",
      "title": "Reference intra-class correlation values",
      "concept": [
        "power"
      ],
      "topics": [
        "mb_icc_reference"
      ]
    },
    {
      "page": "mb_icer",
      "title": "Incremental cost-effectiveness ratio with dominance handling",
      "concept": [
        "cost-effectiveness"
      ],
      "topics": [
        "mb_icer"
      ]
    },
    {
      "page": "mb_inb",
      "title": "Incremental net benefit",
      "concept": [
        "cost-effectiveness"
      ],
      "topics": [
        "mb_inb"
      ]
    },
    {
      "page": "mb_its",
      "title": "Interrupted time series via segmented regression",
      "concept": [
        "estimators"
      ],
      "topics": [
        "mb_its"
      ]
    },
    {
      "page": "mb_logframe",
      "title": "Convert a theory of change into a logframe",
      "concept": [
        "theory of change"
      ],
      "topics": [
        "mb_logframe"
      ]
    },
    {
      "page": "mb_mde",
      "title": "Minimum detectable effect (MDE)",
      "concept": [
        "power"
      ],
      "topics": [
        "mb_mde"
      ]
    },
    {
      "page": "mb_power",
      "title": "Power for a two-sample test",
      "concept": [
        "power"
      ],
      "topics": [
        "mb_power"
      ]
    },
    {
      "page": "mb_qaly",
      "title": "Quality-adjusted life years (QALYs) accumulator",
      "concept": [
        "cost-effectiveness"
      ],
      "topics": [
        "mb_qaly"
      ]
    },
    {
      "page": "mb_questions",
      "title": "Tag and structure evaluation questions",
      "concept": [
        "planning"
      ],
      "topics": [
        "mb_questions"
      ]
    },
    {
      "page": "mb_sample_size",
      "title": "Required sample size for a target power",
      "concept": [
        "power"
      ],
      "topics": [
        "mb_sample_size"
      ]
    },
    {
      "page": "mb_schedule_table",
      "title": "Expose internal lookup tables",
      "concept": [
        "lookups"
      ],
      "topics": [
        "mb_schedule_table"
      ]
    },
    {
      "page": "mb_sms_explain",
      "title": "Explain the Maryland SMS rubric",
      "concept": [
        "Maryland SMS"
      ],
      "topics": [
        "mb_sms_explain"
      ]
    },
    {
      "page": "mb_sms_rate",
      "title": "Score a study against the Maryland Scientific Methods Scale",
      "concept": [
        "Maryland SMS"
      ],
      "topics": [
        "mb_sms_rate"
      ]
    },
    {
      "page": "mb_stakeholders",
      "title": "RACI-style stakeholder register",
      "concept": [
        "planning"
      ],
      "topics": [
        "mb_stakeholders"
      ]
    },
    {
      "page": "mb_stepped_wedge",
      "title": "Stepped-wedge design effect",
      "concept": [
        "power"
      ],
      "topics": [
        "mb_stepped_wedge"
      ]
    },
    {
      "page": "mb_theory_of_change",
      "title": "Build a Magenta Book theory of change",
      "concept": [
        "theory of change"
      ],
      "topics": [
        "mb_theory_of_change"
      ]
    },
    {
      "page": "mb_to_excel",
      "title": "Export an evaluation report to Excel",
      "concept": [
        "reporting"
      ],
      "topics": [
        "mb_to_excel"
      ]
    },
    {
      "page": "mb_to_latex",
      "title": "Render an evaluation report as a LaTeX table",
      "concept": [
        "reporting"
      ],
      "topics": [
        "mb_to_latex"
      ]
    },
    {
      "page": "mb_to_word",
      "title": "Export an evaluation report to Word",
      "concept": [
        "reporting"
      ],
      "topics": [
        "mb_to_word"
      ]
    }
  ],
  "_readme": "https://github.com/charlescoverdale/magentabook/raw/HEAD/README.md",
  "_rundeps": [
    "cli"
  ],
  "_vignettes": [
    {
      "source": "cost-effectiveness-with-greenbook.Rmd",
      "filename": "cost-effectiveness-with-greenbook.html",
      "title": "Cost-effectiveness with magentabook and greenbook",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Step 1: build the cashflows",
        "Step 2: discount",
        "Step 3: cost-effectiveness with magentabook",
        "Step 4: net benefit at standard willingness-to-pay thresholds",
        "Step 5: probabilistic sensitivity",
        "Step 6: report",
        "Composing with greenbook"
      ],
      "created": "2026-04-28 05:49:07",
      "modified": "2026-04-28 16:12:39",
      "commits": 2
    },
    {
      "source": "magentabook.Rmd",
      "filename": "magentabook.html",
      "title": "Designing a Magenta Book evaluation",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Stage 1: theory of change",
        "Stage 2: evaluation plan",
        "Stage 3: power and sample size",
        "Stage 4: rate the evidence",
        "Bringing it together",
        "Reproducibility"
      ],
      "created": "2026-04-28 05:49:07",
      "modified": "2026-05-19 08:19:34",
      "commits": 2
    }
  ],
  "_score": 4.477121254719663,
  "_indexed": true,
  "_nocasepkg": "magentabook",
  "_universes": [
    "charlescoverdale"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.1.1",
      "date": "2026-05-19T11:12:26.000Z",
      "distro": "noble",
      "commit": "a935b2602ee3add829c5a6f9e378bf6fcee335e2",
      "fileid": "897188c92abe3ed6b9987d6ca9716ba34e9960f3997c7bb059d314cef7155b2a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/charlescoverdale/actions/runs/26093145215"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.1.1",
      "date": "2026-05-19T11:11:41.000Z",
      "distro": "noble",
      "commit": "a935b2602ee3add829c5a6f9e378bf6fcee335e2",
      "fileid": "44d6b43549896607308bd62040931c1b8198c01ebb2dd28459e4e748dd29e292",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/charlescoverdale/actions/runs/26093145215"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.1.1",
      "date": "2026-05-19T11:13:43.000Z",
      "commit": "a935b2602ee3add829c5a6f9e378bf6fcee335e2",
      "fileid": "88d29cc9a64f87a45a591dece39ae0b84a4b91cde85561639d4ef6b3d42e85d7",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/charlescoverdale/actions/runs/26093145215"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.1.1",
      "date": "2026-05-19T11:21:04.000Z",
      "commit": "a935b2602ee3add829c5a6f9e378bf6fcee335e2",
      "fileid": "da644abf5e366dff114fee723cb295ca527ec3549886cf0a6ec832e318696064",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/charlescoverdale/actions/runs/26093145215"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.1.1",
      "date": "2026-05-19T11:10:36.000Z",
      "commit": "a935b2602ee3add829c5a6f9e378bf6fcee335e2",
      "fileid": "d5b9a39e2febf23f65e603c1d1d9a287c323d0fa041241929b9ba1d21a46a6ce",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/charlescoverdale/actions/runs/26093145215"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.1.1",
      "date": "2026-05-19T11:10:40.000Z",
      "commit": "a935b2602ee3add829c5a6f9e378bf6fcee335e2",
      "fileid": "7515dee11dd66006725dc137e4008e38a840bd7ea58d7427658a8192cba2dc29",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/charlescoverdale/actions/runs/26093145215"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "0.1.1",
      "date": "2026-05-19T11:10:32.000Z",
      "commit": "a935b2602ee3add829c5a6f9e378bf6fcee335e2",
      "fileid": "b836ef98dd4284e7a6fe4fe778ce8006588a6a67b23693af31da449c3fc7afad",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/charlescoverdale/actions/runs/26093145215"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.1.1",
      "date": "2026-06-02T14:25:46.000Z",
      "commit": "a935b2602ee3add829c5a6f9e378bf6fcee335e2",
      "fileid": "d1f5539803d7854f8489563f6a0f4f1904eddd69ccc28e2cc9b719147a14f762",
      "status": "success",
      "buildurl": "https://github.com/r-universe/charlescoverdale/actions/runs/26093145215"
    }
  ]
}