# NOT RUN {
#define parameter names
params <- c("normal_param", "lognorm_param", "truncnorm_param", "beta_param",
"gamma_param", "dirichlet_param", "bootstrap_param")
#indicate parent distribution types for each parameter
dists <- c("normal", "log-normal", "truncated-normal", "beta", "gamma", "dirichlet", "bootstrap")
#indicate which type of parameterization is used for each parent distribution
parameterization_types <- c("mean, sd", "mean, sd", "mean, sd, ll, ul", "mean, sd", "mean, sd",
"value, mean_prop, sd", "value, weight")
#provide distribution parameters that fully define each parent distribution, and
#ensure that these distribution parameters match the form expected by each combination of dists
#and parameterization_types
dists_params <- list(c(1, 2), c(1, 3), c(1, 0.1, NA, 1), c(.5, .2), c(100, 1),
data.frame(value = c("level1", "level2", "level3"),
mean_prop = c(.1, .4, .5), sd = c(.05, .01, .1)),
data.frame(value = c(1, 2, 4, 6, 7, 8),
weight = c(1, 1, 1, 1, 1, 4)))
#generate 100 samples of parameter values to be used in a probabilistic sensitivity analysis
gen_psa_samp(params = params,
dists = dists,
parameterization_types = parameterization_types,
dists_params = dists_params,
nsamp = 100)
# }
Run the code above in your browser using DataLab