compute_nmb_ceac | R Documentation |
Computes the expected Net Monetary Benefit (ENMB) and the probability of cost-effectiveness for a range of Willingness-To-Pay (WTP) thresholds. This function is useful for generating Cost-Effectiveness Acceptability Curves (CEAC).
compute_nmb_ceac(formula, data, wtp_range = seq(0, 1e+05, 1000))
formula |
A formula of the form
|
data |
A data frame containing the variables used in the formula. |
wtp_range |
A numeric vector of WTP thresholds (e.g., |
An object of class "nmb_ceac"
, which is a data.frame
with columns:
Willingness-to-pay threshold
Expected Net Monetary Benefit at each WTP
Probability of being cost-effective at each WTP
The object also contains the original formula as an attribute.
set.seed(123)
df <- data.frame(
c = rnorm(100, 500, 100),
e = rnorm(100, 0.6, 0.05)
)
ceac_tbl <- compute_nmb_ceac(c + e ~ 1, data = df, wtp_range = seq(0, 2000, 200))
summary(ceac_tbl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.