This function processes raw economic and risk data, fits distributions to the data, generates samples, and outputs the results to a specified file.

output_samples(econ_raw, risks_raw, file.name)

Arguments

econ_raw

A data frame containing raw economic data with columns for age group, outcome, reference QALYs, mean QALYs, lower bound QALYs, and upper bound QALYs.

risks_raw

A data frame containing raw risk data.

file.name

A string specifying the name of the output file.

Value

A list containing sampled outcomes for risks, QALYs, and costs.

Details

The function performs the following steps:

  • Fits triangular distributions to the risk, QALY, and cost data.

  • Generates samples for each outcome using the fitted distributions.

  • Outputs the sampled outcomes to the specified file.

Examples

if (FALSE) { # \dontrun{
econ_raw <- read.csv("economic_data.csv")
risks_raw <- read.csv("risk_data.csv")
output_samples(econ_raw, risks_raw, "output_samples.csv")
} # }