ceaf | R Documentation |
ceaf
is used to compute and plot the cost-effectiveness acceptability
curves (CEAC) and frontier (CEAF) from a probabilistic sensitivity
analysis (PSA) dataset.
ceaf(v.wtp, strategies = NULL, m.e, m.c, currency = "$", ceaf.out = FALSE)
v.wtp |
Numeric vector with willingness-to-pay (WTP) thresholds |
strategies |
String vector with the name of the strategies |
m.e |
Matrix of effectiveness. Each column corresponds to a vector of effectiveness. |
m.c |
Matrix of costs. Each column corresponds to a vector of costs. |
currency |
Currency used in ceaf plot. |
ceaf.out |
Logical variable indicating if ceaf data frame should be returned. |
df.ceaf A melted data frame with each strategy's probability of being cost-effective at each WTP threshold.
gg.ceaf A ggplot object with each strategy's probability of being cost-effective at each WTP threshold.
ceaf
computes the probability of each of the strategies being
cost-effective at each v.wtp
threshold.
# Load PSA dataset
data(psa)
# Name of strategies
strategies <- c("Chemo", "Radio", "Surgery")
# Vector of WTP thresholds
v.wtp <- seq(1000, 150000, by = 10000)
# Matrix of costs
m.c <- psa[, c(2, 4, 6)]
# Matrix of effectiveness
m.e <- psa[, c(3, 5, 7)]
out <- ceaf(v.wtp = v.wtp, strategies = strategies,
m.e = m.e , m.c = m.c,
ceaf.out = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.