View source: R/evaluate_cutpoint.R
evaluate_cutpoint_cost | R Documentation |
Evaluates a cutpoint by returning the mean treatment cost per sample.
evaluate_cutpoint_cost(predicted, actual, pt, nmb)
predicted |
A vector of predicted probabilities. |
actual |
A vector of actual outcomes. |
pt |
The probability threshold to be evaluated. |
nmb |
A named vector containing NMB assigned to each classification and the treatment costs. |
Returns a numeric
value representing the mean cost for that
cutpoint and data.
evaluate_cutpoint_cost(
predicted = runif(1000),
actual = sample(c(0, 1), size = 1000, replace = TRUE),
pt = 0.1,
nmb = c(
"qalys_lost" = 5,
"low_risk_group_treatment_cost" = 0,
"high_risk_group_treatment_cost" = 1,
"low_risk_group_treatment_effect" = 0,
"high_risk_group_treatment_effect" = 0.3,
"outcome_cost" = 10
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.