dectree | R Documentation |
Single edge value (e.g. cost or QALY) wrapper.
dectree( dat_long, label_probs_distns = NULL, label_vals_distns = NULL, state_list = NULL, vals_col = NA, n = 100 )
dat_long |
Long format data frame with from, to, prob, vals columns. |
label_probs_distns |
Probability distribution names |
label_vals_distns |
Value distribution names |
state_list |
State list sets, usually terminal nodes |
vals_col |
Name of values column; defaults to vals |
n |
Number of PSA samples; default 100 |
List of expected values at each node, joint probabilities at terminal state set and PSA samples of these if distributions provided.
library(purrr) library(tibble) dat_long <- tribble( ~from, ~to, ~vals, ~prob, 1, 2, 10, 0.7, 1, 3, NA, 0.3, 2, 4, 100, 0.1, 2, 5, NA, 0.9, 3, 6, 100, 0.9, 3, 7, NA, 0.1) dectree(dat_long, state_list = list(all = c(4,5,6,7)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.