| Title: | HM Treasury Green Book Cost-Benefit Analysis Primitives |
|---|---|
| Description: | Implements cost-benefit analysis primitives from HM Treasury Green Book guidance (HM Treasury, 2022, 2026): the kinked Social Time Preference Rate (STPR), discount factors, net present value (NPV), equivalent annual cost, and real-terms rebasing using the GDP deflator. Designed for UK central government appraisal and evaluation. Bundled parameter tables carry vintage metadata for reproducibility. |
| Authors: | Charles Coverdale [aut, cre] |
| Maintainer: | Charles Coverdale <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-06-03 07:11:51 UTC |
| Source: | https://github.com/charlescoverdale/greenbook |
Applies an OB uplift, optionally with a mitigation factor that
represents progress on risk identification and management:
cost_with_ob = cost_baseline * (1 + ob_pct * (1 - mitigation)).
gb_apply_ob(values, ob_pct, mitigation = 0)gb_apply_ob(values, ob_pct, mitigation = 0)
values |
Numeric vector of baseline cost values. |
ob_pct |
Numeric scalar. Optimism bias percentage as a
decimal. Pass |
mitigation |
Numeric scalar in |
A numeric vector the same length as values, with the
uplift applied.
HM Treasury (2003). Supplementary Green Book Guidance: Optimism Bias, Annex A2 on mitigation factors.
gb_optimism_bias(), gb_appraise().
Other optimism bias:
gb_categories(),
gb_optimism_bias()
costs <- c(100, 50, 50) ob <- gb_optimism_bias("non_standard_buildings") gb_apply_ob(costs, ob) gb_apply_ob(costs, ob, mitigation = 0.5)costs <- c(100, 50, 50) ob <- gb_optimism_bias("non_standard_buildings") gb_apply_ob(costs, ob) gb_apply_ob(costs, ob, mitigation = 0.5)
Runs an end-to-end appraisal: optionally applies optimism bias to costs, optionally applies METB, computes NPV under the kinked STPR, and returns BCR alongside provenance.
gb_appraise( costs, benefits, years = NULL, schedule = "standard", ob = NULL, ob_dimension = "capex", ob_mitigation = 0, metb = FALSE, metb_rate = 0.2, base_year = NULL, vintage = "2022" )gb_appraise( costs, benefits, years = NULL, schedule = "standard", ob = NULL, ob_dimension = "capex", ob_mitigation = 0, metb = FALSE, metb_rate = 0.2, base_year = NULL, vintage = "2022" )
costs |
Numeric vector of cost values per period (real
terms, base year fixed). Sign convention: enter as positive
numbers; |
benefits |
Numeric vector of benefit values per period.
Same length as |
years |
Optional integer vector of years. Defaults to
|
schedule |
One of |
ob |
Optional. Either a category name (character) or a
numeric percentage. If supplied, optimism bias uplift is
applied to |
ob_dimension |
One of |
ob_mitigation |
Numeric in |
metb |
Logical. If |
metb_rate |
Numeric. METB rate when |
base_year |
Optional integer base year. |
vintage |
Methodology vintage label. Default |
A gb_appraisal object with extra fields bcr,
pv_costs, pv_benefits, costs, benefits,
optimism_bias, metb_applied.
HM Treasury (2026). The Green Book: Central Government Guidance on Appraisal and Evaluation.
gb_npv(), gb_optimism_bias(), gb_metb(),
gb_dist_weighted_npv().
Other appraisal:
gb_compare(),
gb_economic_case(),
gb_place_based(),
gb_progression(),
gb_risk_register(),
gb_sensitivity_ob(),
gb_validate()
costs <- c(100, 50, 50, 0, 0, 0, 0, 0, 0, 0) benefits <- c(0, 0, 0, 30, 30, 30, 30, 30, 30, 30) app <- gb_appraise(costs, benefits, ob = "non_standard_buildings", ob_mitigation = 0.5, base_year = 2024) appcosts <- c(100, 50, 50, 0, 0, 0, 0, 0, 0, 0) benefits <- c(0, 0, 0, 30, 30, 30, 30, 30, 30, 30) app <- gb_appraise(costs, benefits, ob = "non_standard_buildings", ob_mitigation = 0.5, base_year = 2024) app
Multiplies an emissions vector (tCO2e per year) by the DESNZ
carbon value at each year, then discounts under the kinked STPR.
Returns a gb_appraisal object.
gb_carbon_npv( emissions, years, scenario = "central", schedule = "standard", base_year = NULL, sign = "cost" )gb_carbon_npv( emissions, years, scenario = "central", schedule = "standard", base_year = NULL, sign = "cost" )
emissions |
Numeric vector of emissions per year, in tCO2e (positive = emitted, negative = avoided / abated). |
years |
Integer vector of years matching |
scenario |
One of |
schedule |
One of |
base_year |
Optional integer base year for monetary values
(e.g. |
sign |
Character. |
A gb_appraisal object.
DESNZ (2023). Valuation of Energy Use and Greenhouse Gas Emissions for Appraisal (November 2023). HM Treasury (2022). The Green Book, on environmental valuation.
Other carbon:
gb_carbon_value()
# 100 tCO2e emitted each year from 2024 to 2030 emissions <- rep(100, 7) years <- 2024:2030 gb_carbon_npv(emissions, years, base_year = 2024)# 100 tCO2e emitted each year from 2024 to 2030 emissions <- rep(100, 7) years <- 2024:2030 gb_carbon_npv(emissions, years, base_year = 2024)
Returns the DESNZ Carbon Value for Appraisal in GBP per tonne of CO2-equivalent at the published 2022 base-year prices, from the November 2023 valuation. Three scenarios: low, central, high.
gb_carbon_value(year, scenario = "central", base_year = NULL)gb_carbon_value(year, scenario = "central", base_year = NULL)
year |
Integer scalar or vector. Year of the emission. Must be within the bundled DESNZ range. |
scenario |
One of |
base_year |
Optional integer to rebase the value via
|
DESNZ moved to a single consolidated series in November 2023, superseding the historical traded / non-traded split. Values are in 2022 prices. The November 2023 publication covers 2010 to 2100; the bundled subset is 2020 to 2050.
Numeric vector of GBP per tCO2e values.
DESNZ (2023). Valuation of Energy Use and Greenhouse Gas Emissions for Appraisal (November 2023). Data tables 1-19, Table 3.
Other carbon:
gb_carbon_npv()
gb_carbon_value(2024) gb_carbon_value(2020:2030) gb_carbon_value(2030, scenario = "high")gb_carbon_value(2024) gb_carbon_value(2020:2030) gb_carbon_value(2030, scenario = "high")
Returns the bundled OB category lookup as a data frame.
gb_categories()gb_categories()
A data frame with columns category, description,
capex_upper, duration_upper.
HM Treasury (2003). Supplementary Green Book Guidance: Optimism Bias.
Other optimism bias:
gb_apply_ob(),
gb_optimism_bias()
gb_categories()gb_categories()
Builds a side-by-side comparison of two or more gb_appraisal
objects. Returns a gb_comparison with a ranked summary table
and the preferred option under both NPV and BCR criteria.
gb_compare(..., by = "npv")gb_compare(..., by = "npv")
... |
|
by |
Character. Ranking criterion: one of |
Every Green Book economic case must compare at least Do Minimum
against one or more Do Something options. gb_compare()
standardises the comparison: NPV, BCR, EANC, PV costs, PV benefits,
and rank under both NPV and BCR. The summary() method renders a
one-page table suitable for a Five Case Model economic case.
A gb_comparison object: a list with class
c("gb_comparison", "list") and elements options,
summary_table, preferred_npv, preferred_bcr, by.
HM Treasury (2022). The Green Book: Central Government Guidance on Appraisal and Evaluation, chapter on options analysis.
gb_appraise(), gb_economic_case().
Other appraisal:
gb_appraise(),
gb_economic_case(),
gb_place_based(),
gb_progression(),
gb_risk_register(),
gb_sensitivity_ob(),
gb_validate()
do_minimum <- gb_appraise(c(50, 0, 0, 0, 0), c(0, 20, 20, 20, 20)) do_max <- gb_appraise(c(150, 0, 0, 0, 0), c(0, 50, 50, 50, 50)) gb_compare(do_minimum = do_minimum, do_max = do_max)do_minimum <- gb_appraise(c(50, 0, 0, 0, 0), c(0, 20, 20, 20, 20)) do_max <- gb_appraise(c(150, 0, 0, 0, 0), c(0, 50, 50, 50, 50)) gb_compare(do_minimum = do_minimum, do_max = do_max)
Computes a cost-effectiveness ratio: total real cost (PV) per unit of monetised or non-monetised output. Standard cross-scheme comparator used by HM Treasury reviewers.
gb_cost_per_unit(appraisal, units_delivered, unit = "unit")gb_cost_per_unit(appraisal, units_delivered, unit = "unit")
appraisal |
A |
units_delivered |
Numeric scalar. The total quantity of the output being delivered (e.g. QALYs gained, tCO2e abated, WELLBYs added, jobs created). |
unit |
Character. Label for the unit (used in print). |
Numeric scalar: PV cost / units delivered, in GBP per unit.
Other reporting:
gb_headline(),
gb_to_excel(),
gb_to_latex(),
gb_to_word()
app <- gb_appraise(c(100, 0, 0, 0, 0), c(0, 0, 0, 0, 0)) gb_cost_per_unit(app, units_delivered = 50, unit = "QALY")app <- gb_appraise(c(100, 0, 0, 0, 0), c(0, 0, 0, 0, 0)) gb_cost_per_unit(app, units_delivered = 50, unit = "QALY")
Returns a data frame describing the source and last-updated date
of every CSV bundled in inst/extdata/. Critical for
reproducibility: every appraisal can record which vintage of
Green Book parameters it used.
gb_data_versions()gb_data_versions()
A data frame with columns dataset, source,
last_updated, notes.
Other lookups:
gb_schedule_table()
gb_data_versions()gb_data_versions()
Returns the multiplicative factor to convert a value expressed in
year from prices to year to prices, using the bundled UK GDP
deflator at market prices (ONS series). Multiply a nominal value
from year from by this factor to express it in year to.
gb_deflator(from, to, source = "bundled")gb_deflator(from, to, source = "bundled")
from |
Integer year of the input value. |
to |
Integer year to express the value in. |
source |
Character. |
A numeric scalar: the deflator factor.
Office for National Statistics. GDP deflator at market prices (series YBGB), updated quarterly. HM Treasury publishes the deflator series alongside the OBR forecast.
Other deflator:
gb_real(),
gb_rebase()
gb_deflator(from = 2020, to = 2024)gb_deflator(from = 2020, to = 2024)
Apply discount factors to a stream
gb_discount(values, years = seq_along(values) - 1L, schedule = "standard")gb_discount(values, years = seq_along(values) - 1L, schedule = "standard")
values |
Numeric vector of cashflow values (real terms, base year fixed). |
years |
Integer vector of years from the base year. Defaults
to |
schedule |
One of |
A numeric vector of discounted (present-value) cashflows.
HM Treasury (2022). The Green Book, Annex A6.
gb_discount_factor(), gb_npv().
Other discounting:
gb_discount_factor(),
gb_eanc(),
gb_npv(),
gb_stpr()
gb_discount(c(0, 100, 100, 100))gb_discount(c(0, 100, 100, 100))
Returns the present-value discount factor for each year, applying the kinked Social Time Preference Rate schedule annually.
gb_discount_factor(years, schedule = "standard", base_year = 0L)gb_discount_factor(years, schedule = "standard", base_year = 0L)
years |
Integer vector of years from the base year. Must be
|
schedule |
One of |
base_year |
Integer base year offset. Default |
The discount factor at year t is computed as the reciprocal of
the cumulative product of (1 + r_k) for periods k = 1, ..., t,
where r_k is the STPR for year k. This handles the kinked
schedule correctly across band transitions (e.g. year 30 to year
31). Within a single band, the closed-form annuity factor
(1 - (1 + r)^(-n)) / r agrees with sum(gb_discount_factor(1:n))
to machine precision.
A numeric vector of discount factors. 1 for years == base_year.
HM Treasury (2022). The Green Book, Annex A6.
HM Treasury (2003). Green Book Supplementary Guidance: Discounting.
gb_stpr(), gb_npv(), gb_eanc().
Other discounting:
gb_discount(),
gb_eanc(),
gb_npv(),
gb_stpr()
gb_discount_factor(0:5) gb_discount_factor(c(0, 30, 31, 75, 76))gb_discount_factor(0:5) gb_discount_factor(c(0, 30, 31, 75, 76))
Returns the Green Book distributional weight applied to net
benefits accruing to a recipient at income income, relative to
a reference income (median by default), under iso-elastic utility:
gb_dist_weight(income, eta = 1.3, reference = "median", income_data = NULL)gb_dist_weight(income, eta = 1.3, reference = "median", income_data = NULL)
income |
Numeric vector of recipient incomes (positive). Equivalised household disposable income is the conventional measure. |
eta |
Numeric scalar. Income elasticity of marginal utility
of income. Default |
reference |
Either |
income_data |
Optional numeric vector. Reference income
distribution for computing the median. Use, e.g., the ONS
household disposable income distribution. If |
Default eta = 1.3 per HM Treasury Green Book Annex A3. Higher
eta places greater weight on lower-income recipients; sensitivity
tests at eta = 0.8 and eta = 2.0 are conventional.
A numeric vector of weights, same length as income.
HM Treasury (2022). The Green Book, Annex A3 on distributional analysis.
Acland, D. and Greenberg, D.H. (2024). The Elasticity of Marginal Utility of Income for Distributional Weighting and Social Discounting: A Meta-Analysis. Journal of Benefit-Cost Analysis.
Other distributional:
gb_dist_weighted_npv()
# Weights across deciles of a stylised income distribution income_deciles <- seq(10000, 100000, length.out = 10) gb_dist_weight(income_deciles)# Weights across deciles of a stylised income distribution income_deciles <- seq(10000, 100000, length.out = 10) gb_dist_weight(income_deciles)
Applies recipient-income distributional weights to a cashflow before discounting under the STPR.
gb_dist_weighted_npv( cashflow, recipient_income, eta = 1.3, schedule = "standard", reference = "median", income_data = NULL, vintage = "2022", base_year = NULL )gb_dist_weighted_npv( cashflow, recipient_income, eta = 1.3, schedule = "standard", reference = "median", income_data = NULL, vintage = "2022", base_year = NULL )
cashflow |
Numeric vector of net cashflows (per period). |
recipient_income |
Numeric vector. The income of the
recipient (or representative recipient cell) in each period.
Must have the same length as |
eta |
Numeric scalar. Default |
schedule |
One of |
reference |
Reference income strategy passed to
|
income_data |
Optional reference income distribution. |
vintage |
Methodology vintage label. Default |
base_year |
Optional integer base year stored on the result. |
A gb_appraisal object with extra fields weights,
eta, and unweighted_npv.
HM Treasury (2022). The Green Book, Annex A3 on distributional analysis.
Other distributional:
gb_dist_weight()
# 5-year benefit stream of GBP 30 going to a low-decile recipient gb_dist_weighted_npv( cashflow = rep(30, 5), recipient_income = rep(15000, 5), income_data = seq(10000, 100000, length.out = 10) )# 5-year benefit stream of GBP 30 going to a low-decile recipient gb_dist_weighted_npv( cashflow = rep(30, 5), recipient_income = rep(15000, 5), income_data = seq(10000, 100000, length.out = 10) )
Converts a present value to an annualised equivalent over a fixed horizon under the STPR. Used to compare options of different durations.
gb_eanc(npv, years, schedule = "standard")gb_eanc(npv, years, schedule = "standard")
npv |
Either a numeric scalar NPV, or a |
years |
Project horizon in years. If |
schedule |
One of |
A numeric scalar: the equivalent annual amount in real terms, base year aligned with the input.
HM Treasury (2022). The Green Book, Annex A on appraisal: equivalent annual cost.
Other discounting:
gb_discount(),
gb_discount_factor(),
gb_npv(),
gb_stpr()
app <- gb_npv(c(-100, 30, 30, 30, 30, 30)) gb_eanc(app)app <- gb_npv(c(-100, 30, 30, 30, 30, 30)) gb_eanc(app)
Wraps a gb_appraisal with the structural sections HMT business
case guidance expects in the Economic Case (the second of the
five cases in the Five Case Model: Strategic, Economic,
Commercial, Financial, Management).
gb_economic_case( appraisal, critical_success_factors = NULL, options_considered = NULL, non_monetised_impacts = NULL, recommendation = NULL, vfm_statement = NULL )gb_economic_case( appraisal, critical_success_factors = NULL, options_considered = NULL, non_monetised_impacts = NULL, recommendation = NULL, vfm_statement = NULL )
appraisal |
A |
critical_success_factors |
Character vector of CSFs. |
options_considered |
Character vector of long-listed option names. |
non_monetised_impacts |
Optional data frame with columns
|
recommendation |
Optional character: the preferred option and rationale. |
vfm_statement |
Optional character: the value-for-money judgment. |
The Five Case Model is HM Treasury's standard structure for
business cases. The Economic Case is the part where Green Book
appraisal sits: monetised costs and benefits, non-monetised
impacts, switching values, sensitivity tests, value for money
judgment, recommended option. gb_economic_case wraps the
appraisal with the sections a reviewer expects to see.
A gb_economic_case object.
HM Treasury (2018). Guide to Developing the Project Business Case (Five Case Model).
Other appraisal:
gb_appraise(),
gb_compare(),
gb_place_based(),
gb_progression(),
gb_risk_register(),
gb_sensitivity_ob(),
gb_validate()
app <- gb_appraise(c(100, 0, 0, 0, 0), c(0, 30, 30, 30, 30)) gb_economic_case( app, critical_success_factors = c("Strategic fit", "Value for money", "Achievability"), options_considered = c("Do nothing", "Do minimum", "Do maximum"), recommendation = "Do maximum: positive NPV and BCR > 1.5" )app <- gb_appraise(c(100, 0, 0, 0, 0), c(0, 30, 30, 30, 30)) gb_economic_case( app, critical_success_factors = c("Strategic fit", "Value for money", "Achievability"), options_considered = c("Do nothing", "Do minimum", "Do maximum"), recommendation = "Do maximum: positive NPV and BCR > 1.5" )
Returns the headline numbers a Green Book reviewer or steering committee expects: NPV, BCR, EANC, payback period, optimism bias applied, vintage. Suitable for a slide or executive summary.
gb_headline(appraisal)gb_headline(appraisal)
appraisal |
A |
A gb_headline object with elements npv, bcr,
eanc, payback_year, optimism_bias, metb_applied,
vintage, base_year, horizon.
gb_appraise(), gb_to_latex(), gb_to_excel().
Other reporting:
gb_cost_per_unit(),
gb_to_excel(),
gb_to_latex(),
gb_to_word()
app <- gb_appraise(c(100, 0, 0, 0, 0), c(0, 30, 30, 30, 30)) gb_headline(app)app <- gb_appraise(c(100, 0, 0, 0, 0), c(0, 30, 30, 30, 30)) gb_headline(app)
Uplifts net public expenditure (or revenue raised) to reflect the welfare cost of distortionary taxation. Default rate is 20 percent per Green Book 2022 / 2026. The historic value (2003) was 30 percent.
gb_metb(values, rate = 0.2, vintage = NULL)gb_metb(values, rate = 0.2, vintage = NULL)
values |
Numeric vector of expenditure values. |
rate |
Numeric scalar. METB rate as a decimal. Default
|
vintage |
Optional character. One of |
The METB captures the welfare loss arising from raising one extra GBP of revenue through the tax system, beyond the GBP itself. Estimates depend on the elasticity of taxable income, the marginal tax rate, and the distortionary margin. The Green Book reduced the headline value from 30 percent (2003) to 20 percent (2018) in light of post-2008 evidence.
A numeric vector the same length as values, with the
METB uplift applied.
HM Treasury (2022). The Green Book: Central Government Guidance on Appraisal and Evaluation, chapter on real terms and the marginal excess tax burden.
gb_metb(c(100, 200)) gb_metb(c(100, 200), vintage = "2003")gb_metb(c(100, 200)) gb_metb(c(100, 200), vintage = "2003")
Computes the net present value of a cashflow stream under the
Green Book STPR. Returns a gb_appraisal object carrying the NPV,
the input cashflow, the discount factors, the schedule used, and
methodology vintage.
gb_npv( cashflow, years = NULL, schedule = "standard", base_year = NULL, vintage = "2022" )gb_npv( cashflow, years = NULL, schedule = "standard", base_year = NULL, vintage = "2022" )
cashflow |
Numeric vector of net cashflows in real terms (one value per year). |
years |
Integer vector of years matching |
schedule |
One of |
base_year |
Optional integer recording the price base year for
the cashflow (e.g. |
vintage |
Character. Methodology vintage label. Defaults to
|
A gb_appraisal object: a list with class
c("gb_appraisal", "list") and elements
npv, cashflow, years, pv, schedule, base_year, vintage.
HM Treasury (2022). The Green Book, chapter on appraisal and the Annex on discounting.
gb_appraise(), gb_eanc(), gb_dist_weighted_npv(),
gb_carbon_npv().
Other discounting:
gb_discount(),
gb_discount_factor(),
gb_eanc(),
gb_stpr()
costs <- c(100, 50, 50, 0, 0, 0, 0, 0, 0, 0) benefits <- c(0, 0, 0, 30, 30, 30, 30, 30, 30, 30) gb_npv(benefits - costs)costs <- c(100, 50, 50, 0, 0, 0, 0, 0, 0, 0) benefits <- c(0, 0, 0, 30, 30, 30, 30, 30, 30, 30) gb_npv(benefits - costs)
Returns the indicative upper-bound optimism bias percentage from HM Treasury Supplementary Green Book Guidance: Optimism Bias (Mott MacDonald 2002, Annex A1). The upper bound is the starting value for ex-ante uplift; mitigation factors reduce it as project definition matures through SOC, OBC, and FBC stages.
gb_optimism_bias(category, dimension = "capex")gb_optimism_bias(category, dimension = "capex")
category |
Character. One of
|
dimension |
Character. |
Numeric scalar: the upper-bound percentage as a decimal (e.g. 0.51 for 51 percent).
HM Treasury (2003). Supplementary Green Book Guidance: Optimism Bias.
Mott MacDonald (2002). Review of Large Public Procurement in the UK. Report commissioned by HM Treasury.
gb_apply_ob(), gb_categories(), gb_appraise().
Other optimism bias:
gb_apply_ob(),
gb_categories()
gb_optimism_bias("non_standard_buildings") gb_optimism_bias("standard_civil_engineering", dimension = "duration")gb_optimism_bias("non_standard_buildings") gb_optimism_bias("standard_civil_engineering", dimension = "duration")
Combines multiple gb_appraisal objects into a single portfolio
appraisal. Introduced in the 2026 Green Book as a recognised
business case structure for places (city deals, devolved
settlements, regional packages) where individual projects are
interdependent.
gb_place_based(..., place = NULL, synergy = 0)gb_place_based(..., place = NULL, synergy = 0)
... |
|
place |
Character scalar. Place name (e.g. |
synergy |
Numeric scalar in |
A gb_place_based object with elements projects,
place, aggregate_npv, aggregate_bcr, per_project,
synergy.
HM Treasury (2026). The Green Book, on place-based business cases.
Other appraisal:
gb_appraise(),
gb_compare(),
gb_economic_case(),
gb_progression(),
gb_risk_register(),
gb_sensitivity_ob(),
gb_validate()
transport <- gb_appraise(c(100, 0, 0, 0, 0), c(0, 30, 30, 30, 30)) housing <- gb_appraise(c(50, 0, 0, 0, 0), c(0, 20, 20, 20, 20)) skills <- gb_appraise(c(20, 20, 0, 0, 0), c(0, 0, 15, 15, 15)) gb_place_based(transport = transport, housing = housing, skills = skills, place = "Example City")transport <- gb_appraise(c(100, 0, 0, 0, 0), c(0, 30, 30, 30, 30)) housing <- gb_appraise(c(50, 0, 0, 0, 0), c(0, 20, 20, 20, 20)) skills <- gb_appraise(c(20, 20, 0, 0, 0), c(0, 0, 15, 15, 15)) gb_place_based(transport = transport, housing = housing, skills = skills, place = "Example City")
Builds a gb_progression showing how NPV, BCR, and key
parameters evolve across the three Green Book business case
stages: Strategic Outline Case (SOC), Outline Business Case
(OBC), and Full Business Case (FBC). Useful for both authoring
a multi-stage appraisal and reviewing how figures have moved
between gateway approvals.
gb_progression(soc, obc = NULL, fbc = NULL)gb_progression(soc, obc = NULL, fbc = NULL)
soc |
Strategic Outline Case |
obc |
Outline Business Case |
fbc |
Full Business Case |
At each stage, optimism bias mitigation typically increases as
project definition firms up. Cost estimates converge towards
base-cost reality; benefit estimates may also shift as evidence
accumulates. The evolution table makes the trajectory visible.
A gb_progression object with elements stages,
evolution (data frame), delta_npv, delta_costs.
HM Treasury (2018). Guide to Developing the Project Business Case (Green Book supplementary guidance).
Other appraisal:
gb_appraise(),
gb_compare(),
gb_economic_case(),
gb_place_based(),
gb_risk_register(),
gb_sensitivity_ob(),
gb_validate()
soc <- gb_appraise(c(100, 0, 0, 0, 0), c(0, 30, 30, 30, 30), ob = "non_standard_buildings", ob_mitigation = 0) obc <- gb_appraise(c(100, 0, 0, 0, 0), c(0, 30, 30, 30, 30), ob = "non_standard_buildings", ob_mitigation = 0.5) fbc <- gb_appraise(c(100, 0, 0, 0, 0), c(0, 30, 30, 30, 30), ob = "non_standard_buildings", ob_mitigation = 0.9) gb_progression(soc, obc, fbc)soc <- gb_appraise(c(100, 0, 0, 0, 0), c(0, 30, 30, 30, 30), ob = "non_standard_buildings", ob_mitigation = 0) obc <- gb_appraise(c(100, 0, 0, 0, 0), c(0, 30, 30, 30, 30), ob = "non_standard_buildings", ob_mitigation = 0.5) fbc <- gb_appraise(c(100, 0, 0, 0, 0), c(0, 30, 30, 30, 30), ob = "non_standard_buildings", ob_mitigation = 0.9) gb_progression(soc, obc, fbc)
Returns the QALY value in GBP at the published base year. The DHSC supplementary Green Book guidance specifies GBP 70,000 per QALY in 2024 prices for cross-government appraisal. NICE Health Technology Assessment uses lower thresholds (GBP 20,000 to GBP 30,000 per QALY).
gb_qaly(qalys, scenario = "dhsc", base_year = NULL)gb_qaly(qalys, scenario = "dhsc", base_year = NULL)
qalys |
Numeric scalar or vector. Quality-Adjusted Life Years gained or lost. |
scenario |
One of |
base_year |
Optional integer base year. If |
A numeric scalar or vector: monetised value in GBP.
DHSC Supplementary Green Book Guidance on health appraisal. NICE methods guides for technology appraisal.
Other valuation:
gb_vpf(),
gb_wellby()
gb_qaly(1) gb_qaly(1, scenario = "nice_upper")gb_qaly(1) gb_qaly(1, scenario = "nice_upper")
Converts nominal values at year-of-occurrence prices to real values at a chosen base year, using the bundled GDP deflator.
gb_real(nominal_values, year, base_year, source = "bundled")gb_real(nominal_values, year, base_year, source = "bundled")
nominal_values |
Numeric vector of nominal values. |
year |
Integer scalar or vector matching |
base_year |
Integer scalar: the base year to convert to. |
source |
Character. |
A numeric vector of real values, in base_year prices.
HM Treasury (2022). The Green Book, chapter on real terms and price-base alignment.
Other deflator:
gb_deflator(),
gb_rebase()
gb_real(nominal_values = c(100, 110, 120), year = 2020:2022, base_year = 2024)gb_real(nominal_values = c(100, 110, 120), year = 2020:2022, base_year = 2024)
Multiplies values currently in from-year real prices by the
deflator factor to express them in to-year real prices.
gb_rebase(values, from, to)gb_rebase(values, from, to)
values |
Numeric vector of real-terms values. |
from |
Integer base year of the input series. |
to |
Integer target base year. |
A numeric vector of values in to-year real prices.
HM Treasury (2022). The Green Book, chapter on real terms and price-base alignment.
Other deflator:
gb_deflator(),
gb_real()
gb_rebase(c(100, 200, 300), from = 2020, to = 2024)gb_rebase(c(100, 200, 300), from = 2020, to = 2024)
Creates a gb_risk_register from a data frame of project risks.
Computes expected loss per risk (probability times impact) and
aggregate exposure. Optionally applied to a gb_appraisal to
produce a risk-adjusted NPV.
gb_risk_register(risks, appraisal = NULL)gb_risk_register(risks, appraisal = NULL)
risks |
A data frame with columns |
appraisal |
Optional |
HM Treasury business case guidance requires a risk register with
monetised exposure for the OBC and FBC stages. gb_risk_register
standardises the structure: every risk has an id, a probability,
a monetary impact, and an expected loss. Aggregation is by category
if the column is present.
A gb_risk_register object.
HM Treasury (2018). The Orange Book: Management of Risk - Principles and Concepts.
Other appraisal:
gb_appraise(),
gb_compare(),
gb_economic_case(),
gb_place_based(),
gb_progression(),
gb_sensitivity_ob(),
gb_validate()
risks <- data.frame( id = c("R1", "R2", "R3"), description = c("Planning delay", "Cost overrun", "Lower demand"), category = c("schedule", "cost", "demand"), probability = c(0.30, 0.50, 0.20), impact_gbp = c(2e6, 5e6, 10e6) ) gb_risk_register(risks)risks <- data.frame( id = c("R1", "R2", "R3"), description = c("Planning delay", "Cost overrun", "Lower demand"), category = c("schedule", "cost", "demand"), probability = c(0.30, 0.50, 0.20), impact_gbp = c(2e6, 5e6, 10e6) ) gb_risk_register(risks)
Returns the bundled STPR kinked schedule as a data frame: one row
per band, columns year_from, year_to, and (depending on
schedule) either all three rate variants or just the requested
one.
gb_schedule_table(schedule = NULL)gb_schedule_table(schedule = NULL)
schedule |
Optional. One of |
A data frame.
gb_stpr(), gb_data_versions().
Other lookups:
gb_data_versions()
gb_schedule_table() gb_schedule_table("health")gb_schedule_table() gb_schedule_table("health")
Recomputes an appraisal across a vector of optimism bias mitigation factors. Convenience wrapper for the standard HMT OB sensitivity test required at SOC, OBC, and FBC stages.
gb_sensitivity_ob( costs, benefits, ob, mitigations = c(0, 0.25, 0.5, 0.75, 1), ... )gb_sensitivity_ob( costs, benefits, ob, mitigations = c(0, 0.25, 0.5, 0.75, 1), ... )
costs |
Numeric vector of cost values. |
benefits |
Numeric vector of benefit values. |
ob |
Either a category name or a numeric OB percentage. |
mitigations |
Numeric vector in |
... |
Passed to |
A gb_sensitivity_ob object: a list with elements
mitigations, npv, bcr, costs_pv.
Other appraisal:
gb_appraise(),
gb_compare(),
gb_economic_case(),
gb_place_based(),
gb_progression(),
gb_risk_register(),
gb_validate()
costs <- c(100, 50, 50, 0, 0, 0, 0, 0, 0, 0) benefits <- c(0, 0, 0, 30, 30, 30, 30, 30, 30, 30) gb_sensitivity_ob(costs, benefits, ob = "non_standard_buildings")costs <- c(100, 50, 50, 0, 0, 0, 0, 0, 0, 0) benefits <- c(0, 0, 0, 30, 30, 30, 30, 30, 30, 30) gb_sensitivity_ob(costs, benefits, ob = "non_standard_buildings")
Returns the HM Treasury Green Book Social Time Preference Rate (STPR) for a vector of years from a base year. The schedule is kinked: the rate steps down at 30, 75, 125, 200, and 300 years. Three variants are supported.
gb_stpr(years, schedule = "standard")gb_stpr(years, schedule = "standard")
years |
Integer vector of years from the base year (year 0 is the base year). Must be non-negative. |
schedule |
One of |
The STPR is composed of pure time preference plus a wealth-effect adjustment for expected per-capita consumption growth. The kink reflects increasing uncertainty over the constituent parameters at longer horizons.
A numeric vector of discount rates (decimals, e.g. 0.035 for
3.5 percent), one per element of years.
HM Treasury (2022). The Green Book: Central Government Guidance on Appraisal and Evaluation, Annex A6.
HM Treasury (2003). Green Book Supplementary Guidance: Discounting.
gb_discount_factor(), gb_discount(), gb_npv().
Other discounting:
gb_discount(),
gb_discount_factor(),
gb_eanc(),
gb_npv()
gb_stpr(0:5) gb_stpr(c(10, 30, 31, 75, 76)) gb_stpr(c(10, 30, 31, 75, 76), schedule = "health")gb_stpr(0:5) gb_stpr(c(10, 30, 31, 75, 76)) gb_stpr(c(10, 30, 31, 75, 76), schedule = "health")
Writes a multi-sheet workbook: summary, cashflow, present values, provenance.
gb_to_excel(appraisal, file)gb_to_excel(appraisal, file)
appraisal |
A |
file |
Output file path (must end in |
Requires the openxlsx package (in Suggests). Install with
install.packages("openxlsx") if not present.
Invisibly, the file path.
Other reporting:
gb_cost_per_unit(),
gb_headline(),
gb_to_latex(),
gb_to_word()
if (requireNamespace("openxlsx", quietly = TRUE)) { app <- gb_appraise(c(100, 0, 0, 0, 0), c(0, 30, 30, 30, 30)) tmp <- tempfile(fileext = ".xlsx") gb_to_excel(app, tmp) }if (requireNamespace("openxlsx", quietly = TRUE)) { app <- gb_appraise(c(100, 0, 0, 0, 0), c(0, 30, 30, 30, 30)) tmp <- tempfile(fileext = ".xlsx") gb_to_excel(app, tmp) }
Render an appraisal as a LaTeX table
gb_to_latex(appraisal, caption = NULL, label = NULL)gb_to_latex(appraisal, caption = NULL, label = NULL)
appraisal |
A |
caption |
Optional table caption. |
label |
Optional LaTeX label for cross-referencing. |
A character scalar containing a LaTeX tabular
environment. Wrap in \\begin{table}...\\end{table} for a
floating table.
Other reporting:
gb_cost_per_unit(),
gb_headline(),
gb_to_excel(),
gb_to_word()
app <- gb_appraise(c(100, 0, 0, 0, 0), c(0, 30, 30, 30, 30)) cat(gb_to_latex(app, caption = "Worked example"))app <- gb_appraise(c(100, 0, 0, 0, 0), c(0, 30, 30, 30, 30)) cat(gb_to_latex(app, caption = "Worked example"))
Writes a one-page Word document with the appraisal headline and cashflow table.
gb_to_word(appraisal, file)gb_to_word(appraisal, file)
appraisal |
A |
file |
Output file path (must end in |
Requires the officer and flextable packages (both in Suggests).
Invisibly, the file path.
Other reporting:
gb_cost_per_unit(),
gb_headline(),
gb_to_excel(),
gb_to_latex()
if (requireNamespace("officer", quietly = TRUE) && requireNamespace("flextable", quietly = TRUE)) { app <- gb_appraise(c(100, 0, 0, 0, 0), c(0, 30, 30, 30, 30)) tmp <- tempfile(fileext = ".docx") gb_to_word(app, tmp) }if (requireNamespace("officer", quietly = TRUE) && requireNamespace("flextable", quietly = TRUE)) { app <- gb_appraise(c(100, 0, 0, 0, 0), c(0, 30, 30, 30, 30)) tmp <- tempfile(fileext = ".docx") gb_to_word(app, tmp) }
Inspects a gb_appraisal for sign-convention errors, base-year
alignment, schedule plausibility, and other common authoring
mistakes. Returns a structured report classifying each check as
pass, warning, or error.
gb_validate(appraisal)gb_validate(appraisal)
appraisal |
A |
Checks performed:
Cashflow length matches years length
Schedule is one of the valid options
Base year is plausible (1900 to 2100)
Vintage matches a recognised Green Book edition
If costs and benefits are present (from gb_appraise()),
costs are non-negative and benefits are non-negative
NPV is finite (no NaN / Inf)
PV costs and PV benefits are consistent with NPV
Warnings flag suspicious patterns: missing base year, unusual optimism bias values, METB outside 0 to 50 percent, very long horizons (> 100 years).
A gb_validation object with elements pass, errors,
warnings, info, and n_checks.
Other appraisal:
gb_appraise(),
gb_compare(),
gb_economic_case(),
gb_place_based(),
gb_progression(),
gb_risk_register(),
gb_sensitivity_ob()
app <- gb_appraise(c(100, 0, 0, 0, 0), c(0, 30, 30, 30, 30)) gb_validate(app)app <- gb_appraise(c(100, 0, 0, 0, 0), c(0, 30, 30, 30, 30)) gb_validate(app)
Returns the DfT TAG-published Value of Preventing a Fatality (VPF) in real terms for a given year. The published 2024 value is GBP 2.153 million; the historical 2018 value (DfT TAG) is GBP 1.958 million. Years between bundled publication dates are filled by an annual real uplift of approximately 2 percent (proxy for real GDP per head growth).
gb_vpf(year = 2024, series = "central")gb_vpf(year = 2024, series = "central")
year |
Integer scalar. The year in which the value is
expressed. Default |
series |
Character. |
Numeric scalar: the VPF in GBP at year year prices.
Department for Transport. Transport Analysis Guidance (TAG) data book.
Other valuation:
gb_qaly(),
gb_wellby()
gb_vpf() gb_vpf(2018)gb_vpf() gb_vpf(2018)
Monetises a life-satisfaction change as Well-being Adjusted Life Years (WELLBYs) per HMT Wellbeing Guidance for Appraisal (July 2021). One WELLBY equals a one-point change in life satisfaction on a 0 to 10 scale, for one person, for one year. The central published unit value is GBP 13,000 in 2019 prices, with a low-high sensitivity of GBP 10,000 to GBP 16,000.
gb_wellby( life_satisfaction_change, persons, years = 1, base_year = NULL, scenario = "central" )gb_wellby( life_satisfaction_change, persons, years = 1, base_year = NULL, scenario = "central" )
life_satisfaction_change |
Numeric scalar or vector. Change in life satisfaction on the 0 to 10 scale (signed; can be positive or negative). |
persons |
Number of people experiencing the change. |
years |
Duration in years. Default |
base_year |
Optional integer base year to express the
monetary value in. If |
scenario |
One of |
A numeric scalar or vector: the WELLBY value in GBP at the requested base year.
HM Treasury (2021). Wellbeing Guidance for Appraisal: Supplementary Green Book Guidance.
Other valuation:
gb_qaly(),
gb_vpf()
# 1-point lift in life satisfaction for 100 people for 5 years gb_wellby(1, persons = 100, years = 5) gb_wellby(1, persons = 100, years = 5, scenario = "low") # Express in 2024 prices gb_wellby(1, persons = 100, years = 5, base_year = 2024)# 1-point lift in life satisfaction for 100 people for 5 years gb_wellby(1, persons = 100, years = 5) gb_wellby(1, persons = 100, years = 5, scenario = "low") # Express in 2024 prices gb_wellby(1, persons = 100, years = 5, base_year = 2024)