| Type: | Package |
| Title: | Economic Evaluation Methods for Cost-Benefit, Partial Budgeting, and Cost-Effectiveness Analyses |
| Version: | 0.1.0 |
| Description: | Provides functions for economic evaluation, including Cost-Benefit Analysis, Benefit-Cost Ratio, Net Present Value, Internal Rate of Return, Partial Budgeting, Budget Impact Analysis, Cost-Effectiveness Analysis, Decision Tree Analysis, One-Way, Two-Way, Multi-Way, and Probabilistic Sensitivity Analyses, Expected Value of Perfect Information, and Expected Value of Partial Perfect Information. The implemented methods are based on established approaches in economic evaluation and decision analysis; see Drummond et al. (2015, ISBN:9780199665884), Briggs et al. (2006, ISBN:9780198526629), Boardman et al. (2018, ISBN:9781108415996), and van Hout et al. (1994) <doi:10.1002/hec.4730030505>. The package produces summaries, graphical displays, and reproducible workflows for applications in veterinary science, agriculture, public health, epidemiology, health economics, and related fields. |
| License: | MIT + file LICENSE |
| URL: | https://github.com/vinodhpmd/EconEvalR |
| BugReports: | https://github.com/vinodhpmd/EconEvalR/issues |
| Depends: | R (≥ 4.3.0) |
| Imports: | cli (≥ 3.6.2), mgcv |
| Suggests: | covr, testthat (≥ 3.0.0) |
| Config/roxygen2/version: | 8.1.0 |
| Config/testthat/edition: | 3 |
| Encoding: | UTF-8 |
| Language: | en-US |
| NeedsCompilation: | no |
| Packaged: | 2026-09-12 17:03:32 UTC; m |
| Author: | Vinodhkumar Obli Rajendran [aut, cre], Keerthi Aaradhana [aut] |
| Maintainer: | Vinodhkumar Obli Rajendran <vinodhkumar.rajendran@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-09-22 07:10:09 UTC |
Convert an EconBCR object to a data frame
Description
Convert an EconBCR object to a data frame
Usage
## S3 method for class 'EconBCR'
as.data.frame(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (unused). |
Value
A data frame with one row containing the benefit, cost, benefit-cost ratio, and decision.
Convert a Budget Impact Analysis Object to a Data Frame
Description
Converts an object of class "EconBIA" into a data frame
suitable for exporting or further analysis.
Usage
## S3 method for class 'EconBIA'
as.data.frame(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (unused). |
Value
A data frame containing the annual budget impact results.
Examples
bia <- budget_impact_analysis(
population = 10000,
uptake = c(0.10, 0.20, 0.35, 0.45, 0.60),
current_cost = 1200,
new_cost = 1500,
years = 5,
discount = 0.03
)
df <- as.data.frame(bia)
head(df)
Convert a Cost-Effectiveness Acceptability Curve Object to a Data Frame
Description
Convert a Cost-Effectiveness Acceptability Curve Object to a Data Frame
Usage
## S3 method for class 'EconCEAC'
as.data.frame(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (unused). |
Value
A data frame containing the willingness-to-pay thresholds, probabilities of cost-effectiveness, and mean incremental net monetary benefit.
Convert a Cost-Effectiveness Acceptability Frontier Object to a Data Frame
Description
Converts an object of class "EconCEAF" into a data
frame suitable for exporting or further analysis.
Usage
## S3 method for class 'EconCEAF'
as.data.frame(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (unused). |
Value
A data frame containing:
- WTP
Willingness-to-pay threshold.
- OptimalStrategy
Optimal strategy at each WTP.
- Probability
Probability that the optimal strategy is cost-effective.
- ExpectedNMB
Expected Net Monetary Benefit of the optimal strategy.
Examples
set.seed(123)
cost <- cbind(
rnorm(100, 1000, 100),
rnorm(100, 1200, 120),
rnorm(100, 1400, 150)
)
effect <- cbind(
rnorm(100, 0.70, 0.05),
rnorm(100, 0.80, 0.05),
rnorm(100, 0.90, 0.05)
)
ceaf <- cost_effectiveness_acceptability_frontier(
cost = cost,
effect = effect,
wtp = c(0, 50000, 100000)
)
df <- as.data.frame(ceaf)
head(df)
Convert an Expected Value of Perfect Information Object to a Data Frame
Description
Converts an object of class "EconEVPI" into a data
frame suitable for exporting or further analysis.
Usage
## S3 method for class 'EconEVPI'
as.data.frame(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (unused). |
Value
A data frame containing:
- WTP
Willingness-to-pay threshold.
- EVPI
Expected Value of Perfect Information.
- ExpectedPerfectInformation
-
Expected value under perfect information,
E[\max(NMB)]. - ExpectedCurrentInformation
-
Expected value under current information,
\max(E[NMB]).
Examples
set.seed(123)
cost <- cbind(
rnorm(100, 1000, 100),
rnorm(100, 1200, 120),
rnorm(100, 1500, 140)
)
effect <- cbind(
rnorm(100, 0.70, 0.05),
rnorm(100, 0.82, 0.05),
rnorm(100, 0.92, 0.05)
)
evpi <- expected_value_perfect_information(
cost = cost,
effect = effect,
wtp = c(0, 50000, 100000)
)
df <- as.data.frame(evpi)
head(df)
Convert an Expected Value of Partial Perfect Information Object to a Data Frame
Description
Convert an Expected Value of Partial Perfect Information Object to a Data Frame
Usage
## S3 method for class 'EconEVPPI'
as.data.frame(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (unused). |
Value
A data frame.
Convert a Probabilistic Sensitivity Analysis Object to a Data Frame
Description
Convert a Probabilistic Sensitivity Analysis Object to a Data Frame
Usage
## S3 method for class 'EconPSA'
as.data.frame(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (unused). |
Value
A data frame containing every Monte Carlo simulation.
Convert a Tornado Diagram Object to a Data Frame
Description
Convert a Tornado Diagram Object to a Data Frame
Usage
## S3 method for class 'EconTornado'
as.data.frame(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (unused). |
Value
A data frame.
Convert a Decision Tree Analysis Object to a Data Frame
Description
Converts an object of class "EconTree" into a data frame
suitable for exporting or further analysis.
Usage
## S3 method for class 'EconTree'
as.data.frame(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (unused). |
Value
A data frame containing the terminal node results.
Examples
strategy <- c(
"Treatment A",
"Treatment B",
"Treatment C"
)
probability <- c(0.30, 0.45, 0.25)
cost <- c(1200, 1800, 2400)
effectiveness <- c(0.70, 0.82, 0.91)
tree <- decision_tree_analysis(
strategy,
probability,
cost,
effectiveness
)
df <- as.data.frame(tree)
head(df)
Benefit-Cost Ratio
Description
Computes the Benefit-Cost Ratio (BCR) for an investment, intervention, or project.
Usage
benefit_cost_ratio(benefit, cost)
Arguments
benefit |
Numeric. Total discounted benefits. |
cost |
Numeric. Total discounted costs. |
Details
The Benefit-Cost Ratio is calculated as
BCR = \frac{Benefit}{Cost}
Value
An object of class "EconBCR".
Examples
benefit_cost_ratio(
benefit = 150000,
cost = 100000
)
Budget Impact Analysis
Description
Performs a Budget Impact Analysis (BIA) by comparing the projected healthcare expenditure under current practice with a new intervention over multiple years.
Usage
budget_impact_analysis(
population,
uptake,
current_cost,
new_cost,
years = length(uptake),
discount = 0
)
Arguments
population |
Numeric scalar representing the eligible population. |
uptake |
Numeric vector representing the annual uptake proportions (0-1) of the new intervention. |
current_cost |
Numeric scalar giving the annual cost per patient under current practice. |
new_cost |
Numeric scalar giving the annual cost per patient under the new intervention. |
years |
Integer giving the number of years. |
discount |
Annual discount rate (default = 0). |
Details
The function calculates, for each year:
Eligible population
Number treated
Current budget
New budget
Incremental budget impact
Discounted budget impact
Cumulative discounted impact
Value
An object of class "EconBIA".
Examples
bia <- budget_impact_analysis(
population = 10000,
uptake = c(0.10,0.20,0.35,0.45,0.60),
current_cost = 1200,
new_cost = 1500,
years = 5,
discount = 0.03
)
print(bia)
summary(bia)
plot(bia)
as.data.frame(bia)
Cost Effectiveness Analysis
Description
Performs a cost-effectiveness analysis (CEA) for two or more competing strategies by comparing their costs and effectiveness.
Usage
cost_effectiveness(strategy, cost, effectiveness)
Arguments
strategy |
Character vector of strategy names. |
cost |
Numeric vector of costs. |
effectiveness |
Numeric vector of effectiveness. |
Details
Cost-effectiveness analysis (CEA) compares alternative interventions in terms of their costs and effectiveness. It provides the basis for identifying efficient interventions and supports subsequent analyses such as Incremental Cost-Effectiveness Ratio (ICER), dominance analysis, cost-effectiveness acceptability curves (CEAC), and expected value of information analyses.
This function summarizes the observed costs and effectiveness for each strategy to facilitate economic evaluation and decision making.
Value
An object of class "EconCEA".
References
Drummond MF, Sculpher MJ, Claxton K, Stoddart GL, Torrance GW (2015). Methods for the Economic Evaluation of Health Care Programmes. 4th ed. Oxford University Press.
Briggs AH, Claxton K, Sculpher MJ (2006). Decision Modelling for Health Economic Evaluation. Oxford University Press.
Sanders GD, Neumann PJ, Basu A, Brock DW, Feeny D, Krahn M, Kuntz KM, Meltzer DO, Owens DK, Prosser LA, Salomon JA, Sculpher MJ, Trikalinos TA, Russell LB, Siegel JE, Ganiats TG (2016). Recommendations for Conduct, Methodological Practices, and Reporting of Cost-effectiveness Analyses. JAMA, 316(10), 1093–1103. doi:10.1001/jama.2016.12195
Examples
cea <- cost_effectiveness(
strategy = c("Current", "Treatment A", "Treatment B"),
cost = c(1000, 1300, 1700),
effectiveness = c(0.60, 0.75, 0.90)
)
print(cea)
summary(cea)
plot(cea)
as.data.frame(cea)
Cost-Effectiveness Acceptability Curve
Description
Computes the Cost-Effectiveness Acceptability Curve (CEAC) using probabilistic sensitivity analysis (PSA) results across a range of willingness-to-pay (WTP) thresholds.
Usage
cost_effectiveness_acceptability_curve(
incremental_cost,
incremental_effect,
wtp = seq(0, 1e+05, by = 1000)
)
Arguments
incremental_cost |
Numeric vector of incremental costs. |
incremental_effect |
Numeric vector of incremental effectiveness values. |
wtp |
Numeric vector of willingness-to-pay thresholds. |
Details
The Cost-Effectiveness Acceptability Curve (CEAC) summarizes the probability that an intervention is cost-effective for different willingness-to-pay (WTP) thresholds.
The Incremental Net Monetary Benefit (INMB) is calculated as
INMB = \lambda \times \Delta E - \Delta C
where
-
\lambda= Willingness-to-pay threshold. -
\Delta E= Incremental effectiveness. -
\Delta C= Incremental cost.
The CEAC is obtained by calculating the proportion of
probabilistic sensitivity analysis simulations for which
the Incremental Net Monetary Benefit is positive
(INMB > 0) at each willingness-to-pay threshold.
CEACs provide a graphical summary of decision uncertainty and are widely used in health economic evaluation.
Value
An object of class "EconCEAC".
References
Fenwick E, Claxton K, Sculpher M (2001). Representing Uncertainty: The Role of Cost-Effectiveness Acceptability Curves. Health Economics, 10(8), 779–787. doi:10.1002/hec.635
Briggs AH, Claxton K, Sculpher MJ (2006). Decision Modelling for Health Economic Evaluation. Oxford University Press.
Drummond MF, Sculpher MJ, Claxton K, Stoddart GL, Torrance GW (2015). Methods for the Economic Evaluation of Health Care Programmes. 4th ed. Oxford University Press.
Examples
set.seed(1)
cost <- rnorm(1000, 500, 100)
effect <- rnorm(1000, 0.35, 0.08)
ceac <- cost_effectiveness_acceptability_curve(
incremental_cost = cost,
incremental_effect = effect,
wtp = seq(0, 5000, 100)
)
print(ceac)
summary(ceac)
plot(ceac)
as.data.frame(ceac)
Cost-Effectiveness Acceptability Frontier
Description
Computes the Cost-Effectiveness Acceptability Frontier (CEAF) for multiple competing strategies using probabilistic sensitivity analysis (PSA) results.
Usage
cost_effectiveness_acceptability_frontier(
cost,
effect,
wtp = seq(0, 1e+05, by = 1000)
)
Arguments
cost |
A numeric matrix of costs. Rows represent probabilistic sensitivity analysis simulations and columns represent competing strategies. |
effect |
A numeric matrix of effectiveness values
having the same dimensions as |
wtp |
A numeric vector of willingness-to-pay (WTP) thresholds. |
Details
The Cost-Effectiveness Acceptability Frontier (CEAF) identifies the strategy with the highest expected Net Monetary Benefit (NMB) at each willingness-to-pay (WTP) threshold and estimates the probability that this strategy is cost-effective.
Net Monetary Benefit (NMB) is calculated as
NMB = \lambda \times Effect - Cost
where
-
\lambda= Willingness-to-pay threshold.
For each willingness-to-pay threshold:
Expected Net Monetary Benefit is calculated for each strategy.
The strategy with the highest expected Net Monetary Benefit is identified.
The probability that this optimal strategy is cost-effective is estimated.
Unlike the Cost-Effectiveness Acceptability Curve (CEAC), the CEAF focuses on the strategy with the highest expected Net Monetary Benefit and therefore identifies the optimal decision across willingness-to-pay thresholds.
Value
An object of class "EconCEAF".
References
Fenwick E, Claxton K, Sculpher M (2001). Representing Uncertainty: The Role of Cost-Effectiveness Acceptability Curves. Health Economics, 10(8), 779–787. doi:10.1002/hec.635
Fenwick E, Claxton K, Briggs A (2001). Cost-Effectiveness Acceptability Curves. Health Economics, 10(8), 779–787.
Briggs AH, Claxton K, Sculpher MJ (2006). Decision Modelling for Health Economic Evaluation. Oxford University Press.
Drummond MF, Sculpher MJ, Claxton K, Stoddart GL, Torrance GW (2015). Methods for the Economic Evaluation of Health Care Programmes. 4th ed. Oxford University Press.
Examples
set.seed(123)
cost <- cbind(
rnorm(1000, 1000, 100),
rnorm(1000, 1200, 120),
rnorm(1000, 1400, 150)
)
effect <- cbind(
rnorm(1000, 0.70, 0.05),
rnorm(1000, 0.80, 0.05),
rnorm(1000, 0.90, 0.05)
)
ceaf <- cost_effectiveness_acceptability_frontier(
cost = cost,
effect = effect
)
print(ceaf)
summary(ceaf)
plot(ceaf)
as.data.frame(ceaf)
Decision Tree Analysis
Description
Performs a decision tree analysis by calculating the expected cost and expected effectiveness for terminal decision pathways based on their probabilities.
Usage
decision_tree_analysis(strategy, probability, cost, effectiveness)
Arguments
strategy |
Character vector of terminal strategy names. |
probability |
Numeric vector of probabilities. |
cost |
Numeric vector of costs. |
effectiveness |
Numeric vector of effectiveness. |
Details
Decision tree analysis is a standard decision-analytic technique used to evaluate alternative interventions under uncertainty by combining probabilities with associated costs and health outcomes.
Expected values are calculated as
Expected\ Cost = Probability \times Cost
and
Expected\ Effectiveness =
Probability \times Effectiveness
The expected values for each terminal strategy can be compared to support evidence-based decision making and economic evaluation.
Value
An object of class "EconTree".
References
Briggs AH, Claxton K, Sculpher MJ (2006). Decision Modelling for Health Economic Evaluation. Oxford University Press.
Drummond MF, Sculpher MJ, Claxton K, Stoddart GL, Torrance GW (2015). Methods for the Economic Evaluation of Health Care Programmes. 4th ed. Oxford University Press.
Sonnenberg FA, Beck JR (1993). Markov Models in Medical Decision Making: A Practical Guide. Medical Decision Making, 13(4), 322–338. doi:10.1177/0272989X9301300409
Examples
strategy <- c(
"Treatment A",
"Treatment B",
"Treatment C"
)
probability <- c(
0.30,
0.45,
0.25
)
cost <- c(
1200,
1800,
2400
)
effectiveness <- c(
0.70,
0.82,
0.91
)
tree <- decision_tree_analysis(
strategy,
probability,
cost,
effectiveness
)
print(tree)
summary(tree)
plot(tree)
as.data.frame(tree)
Discount Cash Flows
Description
Discounts one or more future cash flows to their present values using a specified discount rate.
Usage
discount_cashflow(cashflow, rate, period)
Arguments
cashflow |
Numeric vector of cash flows. |
rate |
Discount rate expressed as a decimal (e.g., 0.10 for 10%). |
period |
Integer vector of time periods corresponding to each cash flow. |
Details
Discounted cash flow (DCF) analysis converts future cash flows into their present values by accounting for the time value of money.
The present value of each cash flow is calculated as
PV = \frac{CF_t}{(1+r)^t}
where
-
CF_t= Cash flow at time periodt. -
r= Discount rate. -
t= Time period.
Discounting is widely used in economic evaluation, investment appraisal, and cost-benefit analysis to compare costs and benefits occurring at different points in time.
Value
An object of class "EconDCF".
References
Boardman AE, Greenberg DH, Vining AR, Weimer DL (2018). Cost-Benefit Analysis: Concepts and Practice. 5th ed. Cambridge University Press.
Brealey RA, Myers SC, Allen F (2020). Principles of Corporate Finance. 13th ed. McGraw-Hill Education.
Drummond MF, Sculpher MJ, Claxton K, Stoddart GL, Torrance GW (2015). Methods for the Economic Evaluation of Health Care Programmes. 4th ed. Oxford University Press.
Examples
discount_cashflow(
cashflow = c(1000, 1200, 1500),
rate = 0.10,
period = 1:3
)
Discounted Payback Period
Description
Calculates the discounted payback period of an investment by accounting for the time value of money.
Usage
discounted_payback_period(cashflow, rate)
Arguments
cashflow |
Numeric vector of cash flows. The first value should represent the initial investment (negative), followed by subsequent cash inflows and/or outflows. |
rate |
Discount rate expressed as a decimal (e.g., 0.10 for 10%). |
Details
The discounted payback period is the time required for the cumulative discounted cash inflows to recover the initial investment. Each future cash flow is first converted to its present value using the specified discount rate.
The present value of each cash flow is calculated as
PV = \frac{CF_t}{(1+r)^t}
where
-
CF_t= Cash flow at time periodt. -
r= Discount rate. -
t= Time period.
When the investment is recovered during a period, linear interpolation is used to estimate the fractional discounted payback period.
Unlike the conventional payback period, the discounted payback period accounts for the time value of money, although it does not consider cash flows occurring after the investment has been recovered.
Value
An object of class "EconDiscountedPayback".
References
Boardman AE, Greenberg DH, Vining AR, Weimer DL (2018). Cost-Benefit Analysis: Concepts and Practice. 5th ed. Cambridge University Press.
Brealey RA, Myers SC, Allen F (2020). Principles of Corporate Finance. 13th ed. McGraw-Hill Education.
Drummond MF, Sculpher MJ, Claxton K, Stoddart GL, Torrance GW (2015). Methods for the Economic Evaluation of Health Care Programmes. 4th ed. Oxford University Press.
Examples
dpb <- discounted_payback_period(
cashflow = c(-50000, 12000, 15000, 18000, 20000),
rate = 0.10
)
print(dpb)
Dominance Analysis
Description
Identifies strongly dominated strategies based on their costs and effectiveness.
Usage
dominance_analysis(strategy, cost, effectiveness)
Arguments
strategy |
Character vector of strategy names. |
cost |
Numeric vector of costs. |
effectiveness |
Numeric vector of effectiveness. |
Details
Dominance analysis is used in cost-effectiveness analysis to identify strategies that are economically inefficient.
A strategy is considered strongly dominated if another strategy has both a lower cost and an equal or greater level of effectiveness.
Strongly dominated strategies are excluded from further economic evaluation because they are always less efficient than at least one competing strategy.
Value
An object of class "EconDominance".
References
Drummond MF, Sculpher MJ, Claxton K, Stoddart GL, Torrance GW (2015). Methods for the Economic Evaluation of Health Care Programmes. 4th ed. Oxford University Press.
Briggs AH, Claxton K, Sculpher MJ (2006). Decision Modelling for Health Economic Evaluation. Oxford University Press.
Fenwick E, Claxton K, Sculpher M (2001). Representing uncertainty: the role of cost-effectiveness acceptability curves. Health Economics, 10(8), 779–787. doi:10.1002/hec.635
Examples
dominance_analysis(
strategy = c("A", "B", "C"),
cost = c(1000, 1200, 900),
effectiveness = c(0.70, 0.75, 0.80)
)
Expected Value of Partial Perfect Information
Description
Computes the Expected Value of Partial Perfect Information (EVPPI) using a regression-based approximation.
Usage
expected_value_partial_perfect_information(
cost,
effect,
parameter,
wtp = seq(0, 1e+05, by = 1000),
method = "gam"
)
Arguments
cost |
Numeric matrix of costs. Rows represent probabilistic sensitivity analysis (PSA) simulations and columns represent competing strategies. |
effect |
Numeric matrix of effectiveness values having
the same dimensions as |
parameter |
Numeric vector containing samples of the uncertain parameter of interest. |
wtp |
Numeric vector of willingness-to-pay thresholds. |
method |
Character string specifying the regression
method. Currently only |
Details
The Expected Value of Partial Perfect Information (EVPPI) quantifies the expected value of eliminating uncertainty in a subset of model parameters while uncertainty in all remaining parameters is retained.
This implementation estimates EVPPI using a regression-
based approximation in which Net Monetary Benefit (NMB) is
regressed on the parameter of interest. The conditional
expectation of NMB is estimated using Generalized Additive
Models implemented in mgcv::gam().
Regression-based EVPPI methods provide an efficient approximation that avoids computationally intensive nested Monte Carlo simulation.
Value
An object of class "EconEVPPI".
References
Strong M, Oakley JE, Brennan A (2014). Estimating Multiparameter Partial Expected Value of Perfect Information from a Probabilistic Sensitivity Analysis Sample: A Nonparametric Regression Approach. Medical Decision Making, 34(3), 311–326. doi:10.1177/0272989X13505910
Briggs AH, Claxton K, Sculpher MJ (2006). Decision Modelling for Health Economic Evaluation. Oxford University Press.
Drummond MF, Sculpher MJ, Claxton K, Stoddart GL, Torrance GW (2015). Methods for the Economic Evaluation of Health Care Programmes. 4th ed. Oxford University Press.
Examples
library(mgcv)
set.seed(123)
cost <- cbind(
rnorm(1000,1000,100),
rnorm(1000,1200,100)
)
effect <- cbind(
rnorm(1000,0.70,0.05),
rnorm(1000,0.82,0.05)
)
theta <- runif(1000)
evppi <- expected_value_partial_perfect_information(
cost = cost,
effect = effect,
parameter = theta
)
Expected Value of Perfect Information
Description
Computes the Expected Value of Perfect Information (EVPI) across a range of willingness-to-pay (WTP) thresholds using probabilistic sensitivity analysis (PSA) results.
Usage
expected_value_perfect_information(
cost,
effect,
wtp = seq(0, 1e+05, by = 1000)
)
Arguments
cost |
A numeric matrix of costs. Rows represent probabilistic sensitivity analysis simulations and columns represent competing strategies. |
effect |
A numeric matrix of effectiveness values
having the same dimensions as |
wtp |
Numeric vector of willingness-to-pay thresholds. |
Details
The Expected Value of Perfect Information (EVPI) quantifies the expected value of eliminating all uncertainty in a decision problem. It represents the maximum amount a decision maker should be willing to pay for perfect information before selecting an intervention.
Net Monetary Benefit (NMB) is calculated as
NMB = \lambda \times Effect - Cost
where
-
\lambda= Willingness-to-pay threshold.
EVPI is calculated as
EVPI =
E[\max(NMB)] -
\max(E[NMB])
where
-
E[\max(NMB)]is the expected value under perfect information. -
\max(E[NMB])is the maximum expected value under current information.
EVPI provides an upper bound on the value of acquiring additional information and is widely used to prioritize future research.
Value
An object of class "EconEVPI".
References
Claxton K (1999). The Irrelevance of Inference: A Decision-Making Approach to the Stochastic Evaluation of Health Care Technologies. Journal of Health Economics, 18(3), 341–364. doi:10.1016/S0167-6296(98)00039-3
Briggs AH, Claxton K, Sculpher MJ (2006). Decision Modelling for Health Economic Evaluation. Oxford University Press.
Drummond MF, Sculpher MJ, Claxton K, Stoddart GL, Torrance GW (2015). Methods for the Economic Evaluation of Health Care Programmes. 4th ed. Oxford University Press.
Examples
set.seed(123)
cost <- cbind(
rnorm(1000, 1000, 100),
rnorm(1000, 1200, 120),
rnorm(1000, 1500, 140)
)
effect <- cbind(
rnorm(1000, 0.70, 0.05),
rnorm(1000, 0.82, 0.05),
rnorm(1000, 0.92, 0.05)
)
evpi <- expected_value_perfect_information(
cost = cost,
effect = effect
)
print(evpi)
Incremental Cost-Effectiveness Ratio
Description
Calculates the Incremental Cost-Effectiveness Ratio (ICER) between competing interventions based on differences in costs and effectiveness.
Usage
icer(cost, effectiveness)
Arguments
cost |
Numeric vector of costs. |
effectiveness |
Numeric vector of effectiveness. |
Details
The Incremental Cost-Effectiveness Ratio (ICER) is calculated as:
ICER = \frac{\Delta Cost}{\Delta Effectiveness}
where:
Delta Cost = Difference in cost between interventions.
Delta Effectiveness = Difference in effectiveness between interventions.
ICER represents the additional cost required to gain one additional unit of effectiveness when moving from one intervention to another.
Value
An object of class "EconICER".
References
Drummond MF, Sculpher MJ, Claxton K, Stoddart GL, Torrance GW (2015). Methods for the Economic Evaluation of Health Care Programmes. 4th ed. Oxford University Press.
Briggs AH, Claxton K, Sculpher MJ (2006). Decision Modelling for Health Economic Evaluation. Oxford University Press.
Sanders GD, Neumann PJ, Basu A, Brock DW, Feeny D, Krahn M, Kuntz KM, Meltzer DO, Owens DK, Prosser LA, Salomon JA, Sculpher MJ, Trikalinos TA, Russell LB, Siegel JE, Ganiats TG (2016). Recommendations for Conduct, Methodological Practices, and Reporting of Cost-effectiveness Analyses. JAMA, 316(10), 1093–1103. doi:10.1001/jama.2016.12195
Examples
icer(
cost = c(1000, 1300, 1700),
effectiveness = c(0.60, 0.75, 0.90)
)
Internal Rate of Return
Description
Calculates the Internal Rate of Return (IRR) for a series of cash flows.
Usage
internal_rate_return(cashflow, interval = c(-0.99, 10), tol = 1e-08)
Arguments
cashflow |
Numeric vector of cash flows. The first value is typically the initial investment (negative), followed by subsequent inflows and/or outflows. |
interval |
Numeric vector of length two specifying the search interval for the IRR. |
tol |
Numerical tolerance for the root-finding algorithm. |
Details
The Internal Rate of Return (IRR) is the discount rate that makes the Net Present Value (NPV) of a series of cash flows equal to zero.
The IRR is obtained by solving
\sum_{t=0}^{n}\frac{CF_t}{(1+r)^t}=0
where:
-
CF_t= Cash flow at timet. -
r= Internal Rate of Return. -
n= Number of time periods.
The solution is obtained numerically using
stats::uniroot().
Value
An object of class "EconIRR".
References
Boardman AE, Greenberg DH, Vining AR, Weimer DL (2018). Cost-Benefit Analysis: Concepts and Practice. 5th ed. Cambridge University Press.
Brealey RA, Myers SC, Allen F (2020). Principles of Corporate Finance. 13th ed. McGraw-Hill Education.
Examples
internal_rate_return(
cashflow = c(-10000, 3000, 3500, 4000, 4500)
)
Modified Internal Rate of Return
Description
Calculates the Modified Internal Rate of Return (MIRR) for a series of cash flows.
Usage
modified_internal_rate_return(cashflow, finance_rate, reinvest_rate)
Arguments
cashflow |
Numeric vector of cash flows. The first value is typically the initial investment (negative), followed by subsequent inflows and/or outflows. |
finance_rate |
Numeric scalar specifying the finance rate (decimal) used to discount negative cash flows. |
reinvest_rate |
Numeric scalar specifying the reinvestment rate (decimal) used to compound positive cash flows. |
Details
The Modified Internal Rate of Return (MIRR) addresses limitations of the traditional Internal Rate of Return (IRR) by assuming that positive cash flows are reinvested at a specified reinvestment rate and negative cash flows are financed at a specified finance rate.
MIRR is calculated as
MIRR =
\left(
\frac{FV_{\mathrm{positive}}}
{-PV_{\mathrm{negative}}}
\right)^{1/n}-1
where
-
FV_{\mathrm{positive}}= Future value of all positive cash flows compounded at the reinvestment rate. -
PV_{\mathrm{negative}}= Present value of all negative cash flows discounted at the finance rate. -
n= Number of compounding periods.
MIRR provides a unique rate of return and is generally preferred over the traditional IRR when multiple sign changes occur in the cash-flow stream.
Value
An object of class "EconMIRR".
References
Brealey RA, Myers SC, Allen F (2020). Principles of Corporate Finance. 13th ed. McGraw-Hill Education.
Boardman AE, Greenberg DH, Vining AR, Weimer DL (2018). Cost-Benefit Analysis: Concepts and Practice. 5th ed. Cambridge University Press.
Examples
mirr <- modified_internal_rate_return(
cashflow = c(-50000, 12000, 15000, 18000, 20000),
finance_rate = 0.08,
reinvest_rate = 0.10
)
print(mirr)
Multi-Way Sensitivity Analysis
Description
Performs deterministic multi-way sensitivity analysis by simultaneously varying two or more model parameters and evaluating the resulting changes in the model outcome.
Usage
multi_way_sensitivity_analysis(parameters, model)
Arguments
parameters |
A data frame in which each row represents a parameter set and each column represents a model parameter. |
model |
A user-defined function that accepts one row
of |
Details
Multi-way sensitivity analysis is a deterministic sensitivity analysis in which two or more parameters are varied simultaneously to evaluate the robustness of model results to plausible changes in model inputs. It is commonly used to investigate interactions among uncertain parameters and to identify combinations of values that substantially influence decision outcomes.
Value
An object of class "EconMWSA".
References
Briggs AH, Claxton K, Sculpher MJ (2006). Decision Modelling for Health Economic Evaluation. Oxford University Press.
Drummond MF, Sculpher MJ, Claxton K, Stoddart GL, Torrance GW (2015). Methods for the Economic Evaluation of Health Care Programmes. 4th ed. Oxford University Press.
Briggs AH, Weinstein MC, Fenwick EAL, Karnon J, Sculpher MJ, Paltiel AD (2012). Model parameter estimation and uncertainty: a report of the ISPOR-SMDM Modeling Good Research Practices Task Force Working Group-6. Medical Decision Making, 32(5), 722–732. doi:10.1177/0272989X12458348
Examples
pars <- data.frame(
Cost = c(1000, 1200, 1400),
Effectiveness = c(0.70, 0.75, 0.82),
Probability = c(0.90, 0.85, 0.80)
)
model <- function(x) {
x$Effectiveness * 5000 -
x$Cost * x$Probability
}
mw <- multi_way_sensitivity_analysis(
parameters = pars,
model = model
)
print(mw)
Net Health Benefit
Description
Calculates the Net Health Benefit (NHB) for one or more competing interventions using a specified willingness-to-pay threshold.
Usage
net_health_benefit(strategy, cost, effectiveness, willingness_to_pay)
Arguments
strategy |
Character vector of strategy names. |
cost |
Numeric vector of costs. |
effectiveness |
Numeric vector of effectiveness. |
willingness_to_pay |
Numeric scalar representing the willingness-to-pay threshold per unit of effectiveness. |
Details
Net Health Benefit (NHB) is calculated as
NHB = E - \frac{C}{\lambda}
where
-
E= Effectiveness. -
C= Cost. -
\lambda= Willingness-to-pay threshold.
NHB expresses health outcomes in natural units after accounting for the opportunity cost of resources. A strategy with the highest NHB at a given willingness-to-pay threshold is considered the preferred option.
Value
An object of class "EconNHB".
References
Stinnett AA, Mullahy J (1998). Net Health Benefits: A New Framework for the Analysis of Uncertainty in Cost-Effectiveness Analysis. Medical Decision Making, 18(2 Suppl), S68–S80. doi:10.1177/0272989X98018002S09
Briggs AH, Claxton K, Sculpher MJ (2006). Decision Modelling for Health Economic Evaluation. Oxford University Press.
Drummond MF, Sculpher MJ, Claxton K, Stoddart GL, Torrance GW (2015). Methods for the Economic Evaluation of Health Care Programmes. 4th ed. Oxford University Press.
Examples
nhb <- net_health_benefit(
strategy = c("Current", "Treatment A", "Treatment B"),
cost = c(1000, 1300, 1700),
effectiveness = c(0.60, 0.75, 0.90),
willingness_to_pay = 5000
)
print(nhb)
Net Monetary Benefit
Description
Calculates the Net Monetary Benefit (NMB) for one or more competing interventions using a specified willingness-to-pay threshold.
Usage
net_monetary_benefit(strategy, cost, effectiveness, willingness_to_pay)
Arguments
strategy |
Character vector of strategy names. |
cost |
Numeric vector of costs. |
effectiveness |
Numeric vector of effectiveness. |
willingness_to_pay |
Numeric scalar specifying the willingness-to-pay threshold per unit of effectiveness. |
Details
Net Monetary Benefit (NMB) is calculated as
NMB = \lambda \times E - C
where
-
\lambda= Willingness-to-pay threshold. -
E= Effectiveness. -
C= Cost.
Net Monetary Benefit converts health outcomes into monetary units using a specified willingness-to-pay threshold. Compared with the Incremental Cost-Effectiveness Ratio (ICER), the NMB framework facilitates statistical analysis and probabilistic sensitivity analysis. The strategy with the highest NMB at a given willingness-to-pay threshold is considered the preferred option.
Value
An object of class "EconNMB".
References
Stinnett AA, Mullahy J (1998). Net Health Benefits: A New Framework for the Analysis of Uncertainty in Cost-Effectiveness Analysis. Medical Decision Making, 18(Suppl. 2), S68–S80. doi:10.1177/0272989X98018002S09
Briggs AH, Claxton K, Sculpher MJ (2006). Decision Modelling for Health Economic Evaluation. Oxford University Press.
Drummond MF, Sculpher MJ, Claxton K, Stoddart GL, Torrance GW (2015). Methods for the Economic Evaluation of Health Care Programmes. 4th ed. Oxford University Press.
Examples
nmb <- net_monetary_benefit(
strategy = c("Current", "Treatment A", "Treatment B"),
cost = c(1000, 1300, 1700),
effectiveness = c(0.60, 0.75, 0.90),
willingness_to_pay = 5000
)
print(nmb)
Net Present Value
Description
Calculates the Net Present Value (NPV) of a project.
Usage
net_present_value(cashflow, rate)
Arguments
cashflow |
Numeric vector of cash flows. |
rate |
Discount rate expressed as a decimal. |
Value
An object of class "EconNPV".
One-Way Sensitivity Analysis
Description
Performs deterministic one-way sensitivity analysis by varying a single model parameter while holding all other parameters constant.
Usage
one_way_sensitivity_analysis(base_case, low, high, model)
Arguments
base_case |
Numeric scalar representing the base-case value of the parameter. |
low |
Numeric scalar specifying the lower value of the parameter. |
high |
Numeric scalar specifying the upper value of the parameter. |
model |
A user-defined function that accepts a single numeric value and returns a numeric outcome. |
Details
One-way sensitivity analysis is a deterministic sensitivity analysis in which one parameter is varied across a specified range while all other model inputs remain fixed at their base-case values. This approach is commonly used to evaluate the influence of individual parameters on model outcomes and to identify key drivers of decision uncertainty.
Value
An object of class "EconOWSA".
References
Drummond MF, Sculpher MJ, Claxton K, Stoddart GL, Torrance GW (2015). Methods for the Economic Evaluation of Health Care Programmes. 4th ed. Oxford University Press.
Briggs AH, Claxton K, Sculpher MJ (2006). Decision Modelling for Health Economic Evaluation. Oxford University Press.
Briggs AH, Weinstein MC, Fenwick EAL, Karnon J, Sculpher MJ, Paltiel AD (2012). Model parameter estimation and uncertainty: a report of the ISPOR-SMDM Modeling Good Research Practices Task Force Working Group-6. Medical Decision Making, 32(5), 722–732. doi:10.1177/0272989X12458348
Examples
model <- function(x) {
5000 * x - 1000
}
ow <- one_way_sensitivity_analysis(
base_case = 0.80,
low = 0.60,
high = 1.00,
model = model
)
print(ow)
Partial Budget Analysis
Description
Performs a partial budget analysis to evaluate the economic consequences of a proposed change in management, production, or intervention.
Usage
partial_budget(added_returns, reduced_costs, added_costs, reduced_returns)
Arguments
added_returns |
Numeric vector of additional returns resulting from the proposed change. |
reduced_costs |
Numeric vector of costs eliminated or reduced by the proposed change. |
added_costs |
Numeric vector of additional costs incurred by the proposed change. |
reduced_returns |
Numeric vector of returns lost as a consequence of the proposed change. |
Details
Partial budgeting evaluates the economic impact of a proposed change by considering only those costs and returns that differ between the current and proposed situations.
Net change is calculated as
(Added\ Returns + Reduced\ Costs) -
(Added\ Costs + Reduced\ Returns)
A positive net change indicates that the proposed change is expected to improve profitability, whereas a negative value indicates an economic loss.
Value
An object of class "EconPB".
References
Kay RD, Edwards WM, Duffy PA (2016). Farm Management. 8th ed. McGraw-Hill Education.
Boardman AE, Greenberg DH, Vining AR, Weimer DL (2018). Cost-Benefit Analysis: Concepts and Practice. 5th ed. Cambridge University Press.
Drummond MF, Sculpher MJ, Claxton K, Stoddart GL, Torrance GW (2015). Methods for the Economic Evaluation of Health Care Programmes. 4th ed. Oxford University Press.
Examples
partial_budget(
added_returns = c(5000, 2500),
reduced_costs = c(1500, 500),
added_costs = c(2000, 1000),
reduced_returns = c(500)
)
Payback Period
Description
Calculates the payback period of an investment based on a series of cash flows.
Usage
payback_period(cashflow)
Arguments
cashflow |
Numeric vector of cash flows. The first value should represent the initial investment (negative), followed by subsequent cash inflows and/or outflows. |
Details
The payback period is the time required for cumulative cash inflows to recover the initial investment. When the investment is recovered during a period, linear interpolation is used to estimate the fractional payback period.
The payback period is calculated as
Payback =
t +
\frac{Remaining\ Investment}
{Cash\ Flow_{t+1}}
where
-
t= Last period before full recovery. Remaining Investment = Unrecovered investment at the end of period
t.-
Cash\ Flow_{t+1}= Cash inflow during the recovery period.
The payback period is widely used as a measure of investment liquidity but does not account for the time value of money or cash flows occurring after recovery.
Value
An object of class "EconPayback".
References
Boardman AE, Greenberg DH, Vining AR, Weimer DL (2018). Cost-Benefit Analysis: Concepts and Practice. 5th ed. Cambridge University Press.
Brealey RA, Myers SC, Allen F (2020). Principles of Corporate Finance. 13th ed. McGraw-Hill Education.
Drummond MF, Sculpher MJ, Claxton K, Stoddart GL, Torrance GW (2015). Methods for the Economic Evaluation of Health Care Programmes. 4th ed. Oxford University Press.
Examples
pb <- payback_period(
cashflow = c(-50000, 12000, 15000, 18000, 20000)
)
print(pb)
Plot Benefit-Cost Ratio Results
Description
Produces a bar chart comparing total benefits and total costs.
Usage
## S3 method for class 'EconBCR'
plot(x, ...)
Arguments
x |
An object of class |
... |
Additional graphical arguments passed to
|
Value
Invisibly returns the midpoints of the bars.
Examples
x <- benefit_cost_ratio(
benefit = 150000,
cost = 100000
)
plot(x)
Plot Budget Impact Analysis
Description
Produces a visualization of the annual incremental budget impact and cumulative budget impact over time.
Usage
## S3 method for class 'EconBIA'
plot(x, type = c("annual", "cumulative"), ...)
Arguments
x |
An object of class |
type |
Type of plot. One of:
|
... |
Additional graphical arguments. |
Value
Produces a budget impact plot.
Examples
bia <- budget_impact_analysis(
population = 10000,
uptake = c(0.10, 0.20, 0.35, 0.45, 0.60),
current_cost = 1200,
new_cost = 1500,
years = 5,
discount = 0.03
)
plot(bia)
plot(bia, type = "cumulative")
Plot Cost-Effectiveness Plane
Description
Plot Cost-Effectiveness Plane
Usage
## S3 method for class 'EconCEA'
plot(x, ...)
Arguments
x |
An object of class |
... |
Additional graphical arguments. |
Value
A Cost-Effectiveness Plane.
Plot Cost-Effectiveness Acceptability Curve
Description
Produces a Cost-Effectiveness Acceptability Curve (CEAC) showing the probability that an intervention is cost-effective over a range of willingness-to-pay (WTP) thresholds.
Usage
## S3 method for class 'EconCEAC'
plot(x, ...)
Arguments
x |
An object of class |
... |
Additional graphical arguments. |
Value
Produces a CEAC plot.
Plot Cost-Effectiveness Acceptability Frontier
Description
Produces a Cost-Effectiveness Acceptability Frontier (CEAF) showing the probability that the optimal strategy is cost-effective over a range of willingness-to-pay (WTP) thresholds.
Usage
## S3 method for class 'EconCEAF'
plot(x, ...)
Arguments
x |
An object of class |
... |
Additional graphical arguments. |
Value
Produces a CEAF plot.
Examples
set.seed(123)
cost <- cbind(
rnorm(100, 1000, 100),
rnorm(100, 1200, 120),
rnorm(100, 1400, 150)
)
effect <- cbind(
rnorm(100, 0.70, 0.05),
rnorm(100, 0.80, 0.05),
rnorm(100, 0.90, 0.05)
)
ceaf <- cost_effectiveness_acceptability_frontier(
cost = cost,
effect = effect,
wtp = c(0, 50000, 100000)
)
plot(ceaf)
Plot Expected Value of Perfect Information
Description
Produces an Expected Value of Perfect Information (EVPI) curve across willingness-to-pay (WTP) thresholds.
Usage
## S3 method for class 'EconEVPI'
plot(x, ...)
Arguments
x |
An object of class |
... |
Additional graphical arguments. |
Value
Produces an EVPI plot.
Examples
set.seed(123)
cost <- cbind(
rnorm(100, 1000, 100),
rnorm(100, 1200, 120),
rnorm(100, 1500, 140)
)
effect <- cbind(
rnorm(100, 0.70, 0.05),
rnorm(100, 0.82, 0.05),
rnorm(100, 0.92, 0.05)
)
evpi <- expected_value_perfect_information(
cost = cost,
effect = effect,
wtp = c(0, 50000, 100000)
)
plot(evpi)
Plot Expected Value of Partial Perfect Information
Description
Produces an Expected Value of Partial Perfect Information (EVPPI) curve across willingness-to-pay (WTP) thresholds.
Usage
## S3 method for class 'EconEVPPI'
plot(x, ...)
Arguments
x |
An object of class |
... |
Additional graphical arguments. |
Value
Produces an EVPPI plot.
Examples
evppi <- list(
wtp = c(0, 50000, 100000),
evppi = c(0, 125, 250)
)
class(evppi) <- "EconEVPPI"
plot(evppi)
Plot Multi-Way Sensitivity Analysis
Description
Plot Multi-Way Sensitivity Analysis
Usage
## S3 method for class 'EconMWSA'
plot(x, ...)
Arguments
x |
An object of class |
... |
Additional graphical arguments. |
Value
Produces a line plot of model outcomes.
Plot Probabilistic Sensitivity Analysis
Description
Displays the distribution of simulated outcomes.
Usage
## S3 method for class 'EconPSA'
plot(x, ...)
Arguments
x |
An object of class |
... |
Additional graphical arguments. |
Value
Produces a histogram with density curve.
Plot Threshold Analysis
Description
Plot Threshold Analysis
Usage
## S3 method for class 'EconThreshold'
plot(x, ...)
Arguments
x |
An object of class |
... |
Additional graphical arguments. |
Value
Produces a threshold analysis plot.
Plot Tornado Diagram
Description
Creates a tornado diagram for an object of class
"EconTornado", showing the low and high outcome values
for each parameter relative to the base-case value.
Usage
## S3 method for class 'EconTornado'
plot(x, ...)
Arguments
x |
An object of class |
... |
Additional graphical arguments passed to |
Value
Invisibly returns the supplied "EconTornado" object.
Plot Decision Tree Analysis Results
Description
Produces a bar plot of expected costs or expected effectiveness for each terminal strategy.
Usage
## S3 method for class 'EconTree'
plot(x, type = c("cost", "effectiveness"), ...)
Arguments
x |
An object of class |
type |
Character string specifying the quantity to
plot. One of |
... |
Additional graphical arguments. |
Value
Produces a bar plot.
Examples
strategy <- c(
"Treatment A",
"Treatment B",
"Treatment C"
)
probability <- c(0.30, 0.45, 0.25)
cost <- c(1200, 1800, 2400)
effectiveness <- c(0.70, 0.82, 0.91)
tree <- decision_tree_analysis(
strategy,
probability,
cost,
effectiveness
)
plot(tree)
plot(tree, type = "effectiveness")
Present Value
Description
Calculates the present value of one or more future cash flows.
Usage
present_value(future_value, rate, period)
Arguments
future_value |
Numeric vector of future values. |
rate |
Discount rate expressed as a decimal. |
period |
Integer vector of periods. |
Details
Present value is calculated as
PV=\frac{FV}{(1+r)^t}
where
FV = Future Value
r = Discount rate
t = Time period
Value
An object of class "EconPV".
Examples
pv <- present_value(
future_value = c(1000,1500,2000),
rate = 0.10,
period = 1:3
)
print(pv)
Print an EconBCR object
Description
Print an EconBCR object
Usage
## S3 method for class 'EconBCR'
print(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (unused). |
Value
Invisibly returns the object.
Print a Budget Impact Analysis Object
Description
Print a Budget Impact Analysis Object
Usage
## S3 method for class 'EconBIA'
print(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (unused). |
Value
The input object, invisibly.
Print a Cost-Effectiveness Acceptability Curve Object
Description
Print a Cost-Effectiveness Acceptability Curve Object
Usage
## S3 method for class 'EconCEAC'
print(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (unused). |
Value
The input object, invisibly.
Print a Cost-Effectiveness Acceptability Frontier Object
Description
Print a Cost-Effectiveness Acceptability Frontier Object
Usage
## S3 method for class 'EconCEAF'
print(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (unused). |
Value
The input object, invisibly.
Print an Expected Value of Perfect Information Object
Description
Print an Expected Value of Perfect Information Object
Usage
## S3 method for class 'EconEVPI'
print(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (unused). |
Value
The input object, invisibly.
Print an Expected Value of Partial Perfect Information Object
Description
Print an Expected Value of Partial Perfect Information Object
Usage
## S3 method for class 'EconEVPPI'
print(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (unused). |
Value
The input object, invisibly.
Print a Probabilistic Sensitivity Analysis Object
Description
Print a Probabilistic Sensitivity Analysis Object
Usage
## S3 method for class 'EconPSA'
print(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (unused). |
Value
The input object, invisibly.
Print a Tornado Diagram Object
Description
Print a Tornado Diagram Object
Usage
## S3 method for class 'EconTornado'
print(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (unused). |
Value
The input object, invisibly.
Print a Decision Tree Analysis Object
Description
Print a Decision Tree Analysis Object
Usage
## S3 method for class 'EconTree'
print(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (unused). |
Value
The input object, invisibly.
Probabilistic Sensitivity Analysis
Description
Performs Monte Carlo simulation for economic evaluation.
Usage
probabilistic_sensitivity_analysis(n = 1000, sampler, model, seed = NULL)
Arguments
n |
Integer. Number of Monte Carlo simulations. |
sampler |
A function generating one random parameter set. The function should return a list. |
model |
A function accepting the sampled parameter list and returning a single numeric outcome. |
seed |
Optional integer random seed. |
Details
This function performs probabilistic sensitivity analysis
(PSA) using Monte Carlo simulation. During each iteration,
random parameters are generated by sampler() and passed
to model(). The model must return one finite numeric
outcome.
Value
An object of class "EconPSA".
Examples
sampler <- function() {
list(
cost = rnorm(1, 1000, 100),
effectiveness = rbeta(1, 20, 5)
)
}
model <- function(par) {
par$effectiveness * 5000 -
par$cost
}
psa <- probabilistic_sensitivity_analysis(
n = 1000,
sampler = sampler,
model = model,
seed = 123
)
Profitability Index
Description
Calculates the Profitability Index (PI).
Usage
profitability_index(cashflow, rate)
Arguments
cashflow |
Numeric vector of cash flows. |
rate |
Discount rate. |
Value
Object of class "EconPI".
Summarize an EconBCR object
Description
Summarize an EconBCR object
Usage
## S3 method for class 'EconBCR'
summary(object, ...)
Arguments
object |
An object of class |
... |
Additional arguments (unused). |
Value
A data frame summarizing the benefit-cost analysis.
Summarize a Budget Impact Analysis Object
Description
Returns a summary of the annual and cumulative budget impact over the specified time horizon.
Usage
## S3 method for class 'EconBIA'
summary(object, ...)
Arguments
object |
An object of class |
... |
Additional arguments (unused). |
Value
A data frame containing annual budget impact results.
Examples
bia <- budget_impact_analysis(
population = 10000,
uptake = c(0.10, 0.20, 0.35, 0.45, 0.60),
current_cost = 1200,
new_cost = 1500,
years = 5,
discount = 0.03
)
summary(bia)
Summarize a Cost-Effectiveness Analysis
Description
Summarize a Cost-Effectiveness Analysis
Usage
## S3 method for class 'EconCEA'
summary(object, ...)
Arguments
object |
An object of class |
... |
Additional arguments (unused). |
Value
A data frame summarizing the cost-effectiveness analysis.
Summarize a Cost-Effectiveness Acceptability Curve Object
Description
Summarize a Cost-Effectiveness Acceptability Curve Object
Usage
## S3 method for class 'EconCEAC'
summary(object, ...)
Arguments
object |
An object of class |
... |
Additional arguments (unused). |
Value
A data frame summarizing the Cost-Effectiveness Acceptability Curve.
Summarize a Cost-Effectiveness Acceptability Frontier Object
Description
Returns a summary of the Cost-Effectiveness Acceptability Frontier (CEAF) results across all willingness-to-pay (WTP) thresholds.
Usage
## S3 method for class 'EconCEAF'
summary(object, ...)
Arguments
object |
An object of class |
... |
Additional arguments (unused). |
Value
A data frame containing:
- WTP
Willingness-to-pay threshold.
- OptimalStrategy
Optimal strategy at each WTP.
- Probability
Probability that the optimal strategy is truly cost-effective.
- ExpectedNMB
Expected Net Monetary Benefit.
Examples
set.seed(123)
cost <- cbind(
rnorm(100, 1000, 100),
rnorm(100, 1200, 120),
rnorm(100, 1400, 150)
)
effect <- cbind(
rnorm(100, 0.70, 0.05),
rnorm(100, 0.80, 0.05),
rnorm(100, 0.90, 0.05)
)
ceaf <- cost_effectiveness_acceptability_frontier(
cost = cost,
effect = effect,
wtp = c(0, 50000, 100000)
)
summary(ceaf)
Summarize an Expected Value of Perfect Information Object
Description
Returns a summary of the Expected Value of Perfect Information (EVPI) across willingness-to-pay (WTP) thresholds.
Usage
## S3 method for class 'EconEVPI'
summary(object, ...)
Arguments
object |
An object of class |
... |
Additional arguments (unused). |
Value
A data frame containing:
- WTP
Willingness-to-pay threshold.
- EVPI
Expected Value of Perfect Information.
- ExpectedPerfectInformation
-
Expected value under perfect information,
E[\max(NMB)]. - ExpectedCurrentInformation
-
Expected value under current information,
\max(E[NMB]).
Examples
set.seed(123)
cost <- cbind(
rnorm(100, 1000, 100),
rnorm(100, 1200, 120),
rnorm(100, 1500, 140)
)
effect <- cbind(
rnorm(100, 0.70, 0.05),
rnorm(100, 0.82, 0.05),
rnorm(100, 0.92, 0.05)
)
evpi <- expected_value_perfect_information(
cost = cost,
effect = effect,
wtp = c(0, 50000, 100000)
)
summary(evpi)
Summarize an Expected Value of Partial Perfect Information Object
Description
Returns a summary of the Expected Value of Partial Perfect Information (EVPPI) across willingness-to-pay (WTP) thresholds.
Usage
## S3 method for class 'EconEVPPI'
summary(object, ...)
Arguments
object |
An object of class |
... |
Additional arguments (unused). |
Value
A data frame containing:
- WTP
Willingness-to-pay threshold.
- EVPPI
Expected Value of Partial Perfect Information.
Examples
evppi <- list(
wtp = c(0, 50000, 100000),
evppi = c(0, 125, 250)
)
class(evppi) <- "EconEVPPI"
summary(evppi)
Summarize a Probabilistic Sensitivity Analysis Object
Description
Summarize a Probabilistic Sensitivity Analysis Object
Usage
## S3 method for class 'EconPSA'
summary(object, ...)
Arguments
object |
An object of class |
... |
Additional arguments (unused). |
Value
A data frame containing summary statistics.
Summarize a Tornado Diagram Object
Description
Summarize a Tornado Diagram Object
Usage
## S3 method for class 'EconTornado'
summary(object, ...)
Arguments
object |
An object of class |
... |
Additional arguments (unused). |
Value
A data frame summarizing the tornado analysis.
Summarize a Decision Tree Analysis Object
Description
Returns a summary of the expected costs and expected effectiveness for each terminal node.
Usage
## S3 method for class 'EconTree'
summary(object, ...)
Arguments
object |
An object of class |
... |
Additional arguments (unused). |
Value
A data frame containing:
- Strategy
Terminal strategy.
- Probability
Terminal node probability.
- Cost
Observed cost.
- Effectiveness
Observed effectiveness.
- ExpectedCost
Expected cost.
- ExpectedEffectiveness
Expected effectiveness.
Examples
strategy <- c(
"Treatment A",
"Treatment B",
"Treatment C"
)
probability <- c(0.30, 0.45, 0.25)
cost <- c(1200, 1800, 2400)
effectiveness <- c(0.70, 0.82, 0.91)
tree <- decision_tree_analysis(
strategy,
probability,
cost,
effectiveness
)
summary(tree)
Threshold Analysis
Description
Identifies the threshold value of a parameter at which a model outcome reaches a specified target.
Usage
threshold_analysis(lower, upper, target = 0, model, tol = 1e-08)
Arguments
lower |
Lower search bound. |
upper |
Upper search bound. |
target |
Target outcome. |
model |
Function returning the model outcome. |
tol |
Numerical tolerance. |
Value
Object of class "EconThreshold".
Tornado Diagram
Description
Creates data for a tornado diagram.
Usage
tornado_diagram(parameter, low, high, base_case)
Arguments
parameter |
Character vector of parameter names. |
low |
Numeric vector of outcomes at the low value. |
high |
Numeric vector of outcomes at the high value. |
base_case |
Numeric scalar. |
Value
Object of class "EconTornado".
Two-Way Sensitivity Analysis
Description
Performs deterministic two-way sensitivity analysis by varying two model parameters simultaneously.
Usage
two_way_sensitivity_analysis(parameter1, parameter2, model)
Arguments
parameter1 |
Numeric vector of values for parameter 1. |
parameter2 |
Numeric vector of values for parameter 2. |
model |
Function accepting two arguments and returning a numeric outcome. |
Value
An object of class "EconTWSA".