{
  "_id": "6ad5ff276b811b735aabe117",
  "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-09-19 10:23:34 UTC",
  "RemoteUrl": "https://github.com/charlescoverdale/magentabook",
  "RemoteRef": "HEAD",
  "RemoteSha": "08c270ef11d84e72bc23082f63e2fb107fc8de41",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-10-19 11:25:47 UTC",
    "User": "root"
  },
  "Author": "Charles Coverdale [aut, cre]",
  "Maintainer": "Charles Coverdale <charlesfcoverdale@gmail.com>",
  "_user": "charlescoverdale",
  "_type": "src",
  "_file": "magentabook_0.1.1.tar.gz",
  "_fileid": "https://r2.ropensci.org/5ba898bb087182ebadd8571b2acbf1fee92f0596fdca4fc0b22d78748b1c31c7",
  "_filesize": 429450,
  "_sha256": "5ba898bb087182ebadd8571b2acbf1fee92f0596fdca4fc0b22d78748b1c31c7",
  "_expires": "2027-01-27T11:29:41.000Z",
  "_created": "2026-10-19T11:25:47.000Z",
  "_published": "2026-10-19T11:29:43.172Z",
  "_buildurl": "https://github.com/r-universe/charlescoverdale/actions/runs/39243797224",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_jobs": [
    {
      "job": 118033382690,
      "time": 161,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "12182713043"
    },
    {
      "job": 118033382674,
      "time": 147,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "12183285794"
    },
    {
      "job": 118033382811,
      "time": 99,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "12183110834"
    },
    {
      "job": 118033382672,
      "time": 142,
      "config": "macos-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "12182398581"
    },
    {
      "job": 118030808657,
      "time": 384,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "12183255849"
    },
    {
      "job": 118033382697,
      "time": 119,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "12182258577"
    },
    {
      "job": 118033382792,
      "time": 103,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "12182548054"
    },
    {
      "job": 118033382720,
      "time": 95,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "12182493259"
    },
    {
      "job": 118033382742,
      "time": 73,
      "config": "windows-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "12182353390"
    }
  ],
  "_upstream": "https://github.com/charlescoverdale/magentabook",
  "_commit": {
    "id": "08c270ef11d84e72bc23082f63e2fb107fc8de41",
    "author": "Charles Coverdale <charlesfcoverdale@gmail.com>",
    "committer": "Charles Coverdale <charlesfcoverdale@gmail.com>",
    "message": "Add llms-full.txt, the agent-facing API reference\n\ncharlescoverdale.github.io/llms.txt points agents at this file for every\npackage it lists, and this package did not have one. Generated from the\nRd files by generate_llms_full.R: every export with its signature,\narguments, return value and example.\n\nBuild-ignored so it stays out of the CRAN tarball.\n",
    "time": 1789813414
  },
  "_maintainer": {
    "name": "Charles Coverdale",
    "email": "charlesfcoverdale@gmail.com",
    "login": "charlescoverdale",
    "linkedin": "in/charlescoverdale",
    "twitter": "@cfcoverdale",
    "description": "economics | climate science | R",
    "uuid": 21993492
  },
  "_distro": "resolute",
  "_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
    },
    {
      "week": "2026-33",
      "n": 1
    },
    {
      "week": "2026-38",
      "n": 1
    }
  ],
  "_tags": [
    {
      "name": "v0.1.1",
      "date": "2026-08-15"
    }
  ],
  "_stars": 0,
  "_contributors": [
    {
      "user": "charlescoverdale",
      "count": 15,
      "uuid": 21993492
    }
  ],
  "_userbio": {
    "uuid": 21993492,
    "type": "user",
    "name": "Charles Coverdale",
    "followers": 16,
    "description": "economics | climate science | R"
  },
  "_downloads": {
    "count": 344,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/magentabook"
  },
  "_devurl": "https://github.com/charlescoverdale/magentabook",
  "_searchresults": 0,
  "_rbuild": "4.6.1",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/magentabook.html",
    "extra/manual.pdf",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "LICENSE"
  ],
  "_homeurl": "https://github.com/charlescoverdale/magentabook",
  "_realowner": "charlescoverdale",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.1.0",
      "date": "2026-04-29"
    },
    {
      "version": "0.1.1",
      "date": "2026-09-08"
    }
  ],
  "_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.698970004336019,
  "_indexed": true,
  "_nocasepkg": "magentabook",
  "_universes": [
    "charlescoverdale"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.1.1",
      "date": "2026-10-19T11:28:28.000Z",
      "distro": "resolute",
      "commit": "08c270ef11d84e72bc23082f63e2fb107fc8de41",
      "fileid": "https://r2.ropensci.org/82781f399d3740e5648f29a96004fe90c4070d4171494d5eb8da2434e3660e38",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/charlescoverdale/actions/runs/39243797224"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "0.1.1",
      "date": "2026-10-19T11:28:10.000Z",
      "distro": "resolute",
      "commit": "08c270ef11d84e72bc23082f63e2fb107fc8de41",
      "fileid": "https://r2.ropensci.org/faad65afbdf08d8d34d6fb61fd4c2ec6b2b4a281043b58eb06654c5172c22d07",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/charlescoverdale/actions/runs/39243797224"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.1.1",
      "date": "2026-10-19T11:28:16.000Z",
      "commit": "08c270ef11d84e72bc23082f63e2fb107fc8de41",
      "fileid": "https://r2.ropensci.org/a33f0d73d5a3a06801534701963c0bd0830d72e42e84c59cbb85614cc250ddd3",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/charlescoverdale/actions/runs/39243797224"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "0.1.1",
      "date": "2026-10-19T11:28:36.000Z",
      "commit": "08c270ef11d84e72bc23082f63e2fb107fc8de41",
      "fileid": "https://r2.ropensci.org/d19ee6978f44495b1ae2452d7b2ba8c8fd93546ae06beae2e42d5781efe2f6d0",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/charlescoverdale/actions/runs/39243797224"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.1.1",
      "date": "2026-10-19T11:28:05.000Z",
      "commit": "08c270ef11d84e72bc23082f63e2fb107fc8de41",
      "fileid": "https://r2.ropensci.org/32ffe3255752753d84e899565e1f4d79f294ef43e376fc2d56fddfe0d6300996",
      "status": "success",
      "buildurl": "https://github.com/r-universe/charlescoverdale/actions/runs/39243797224"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.1.1",
      "date": "2026-10-19T11:27:13.000Z",
      "commit": "08c270ef11d84e72bc23082f63e2fb107fc8de41",
      "fileid": "https://r2.ropensci.org/acdd1c9175934c7d55ac4d854f02ce53b65af409fdbea6493bd64c4beac79c6d",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/charlescoverdale/actions/runs/39243797224"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.1.1",
      "date": "2026-10-19T11:27:09.000Z",
      "commit": "08c270ef11d84e72bc23082f63e2fb107fc8de41",
      "fileid": "https://r2.ropensci.org/491c963b18b776a46efaf937150965d16741c80ffdb9c63644b055bda4019cc6",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/charlescoverdale/actions/runs/39243797224"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "0.1.1",
      "date": "2026-10-19T11:26:57.000Z",
      "commit": "08c270ef11d84e72bc23082f63e2fb107fc8de41",
      "fileid": "https://r2.ropensci.org/0b1ee2e983f464d4dabc28bbad331cbee66918ecc5430dbd134306967138be8a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/charlescoverdale/actions/runs/39243797224"
    }
  ]
}