Skip to contents

This function generates PSA data based on provided parameter names, distributions, and distribution arguments.

Usage

sample_psa_data(v_psa_params, l_psa_params, n_sim)

Arguments

v_psa_params

A character vector of PSA parameter names.

l_psa_params

A list containing all model PSA parameters. The list is expected to be either l_psa_parameters or of identical structure.

n_sim

An integer specifying the number of simulations to run.

Value

A data frame where each column represents a parameter, with values sampled according to the specified distributions and arguments.

Examples

if (FALSE) {
# Generate PSA data
df_psa <- sample_psa_data(
 v_psa_params = names(NeuroblastomaPSM::l_psa_parameters),
 l_psa_params = NeuroblastomaPSM::l_psa_parameters,
 n_sim = 100
)

head(df_psa)

df_psa2 <- sample_psa_data(
 v_psa_params = c("u_EFS", "cost_laboratory"),
 l_psa_params = NeuroblastomaPSM::l_psa_parameters,
 n_sim = 100
)

head(df_psa2)
}