Siobhan McAndrew
2026-04-12
bcrdecomp provides methods for decomposing changes in benefit–cost
ratios into contributions from changes in benefits and costs.
Because the benefit-cost ratio is a non-linear function of benefits and costs, there is no technical solution which provides a single, correct attribution of overall BCR change to change in benefits versus change in costs. The methods implemented here provide a range of defensible approaches to approximate this decomposition.
Results should be reported transparently and interpreted with care, since all decompositions are necessarily approximations rather than exact attributions.
The example below compares a baseline case with a comparison case and reports the contributions of changes in benefits and costs to the overall change in the benefit-cost ratio.
library(bcrdecomp)
linear(b0 = 100, c0 = 50, b1 = 120, c1 = 40)## bcrdecomp result
## Method: Linear approximation
## Scale: level
## Baseline BCR: 2
## Comparison BCR: 3
## Contribution from benefits: 0.444
## Contribution from costs: 0.543
## Approximate change in BCR: 0.988
lcd(b0 = 100, c0 = 50, b1 = 120, c1 = 40)## bcrdecomp result
## Method: log-change decomposition
## Scale: log
## Baseline BCR: 2
## Comparison BCR: 3
## Log-change contribution from benefits: 0.182
## Log-change contribution from costs: 0.223
## Total log-change in BCR: 0.405
shapley(b0 = 100, c0 = 50, b1 = 120, c1 = 40)## bcrdecomp result
## Method: Shapley decomposition
## Scale: level
## Baseline BCR: 2
## Comparison BCR: 3
## Contribution from benefits: 0.45
## Contribution from costs: 0.55
## Total change in BCR: 1
lmdi(b0 = 100, c0 = 50, b1 = 120, c1 = 40)## bcrdecomp result
## Method: LMDI decomposition
## Scale: level
## Baseline BCR: 2
## Comparison BCR: 3
## Contribution from benefits: 0.45
## Contribution from costs: 0.55
## Total change in BCR: 1
The current implementation provides four approaches:
-
linear: uses a first-order linear approximation evaluated at midpoint values. This method provides an approximation and does not, in general, sum exactly to the observed change. -
lcd: decomposes the change in the logarithm of the BCR. -
shapley: uses Shapley value decomposition, a method from cooperative game theory, to attribute changes in BCR levels by averaging over alternative sequences of change. -
lmdi: decomposes changes in BCR levels using logarithmic mean weighting.
You can install the development version of bcrdecomp from local source
using:
devtools::install()