This method adds economic data to an RSVProgramme object.

# S4 method for class 'RSVProgramme'
add_economics(object, econ_name, econ_raw, risks_raw, risks_vhr_raw)

Arguments

object

An object of class RSVProgramme.

econ_name

A character string representing the name of the economic data.

econ_raw

A data frame containing the raw economic data.

risks_raw

A data frame containing the raw risks data.

risks_vhr_raw

A data frame containing the raw very high risk (VHR) data.

Value

The updated RSVProgramme object with the added economic data.

Details

This method performs the following steps:

  • Checks if the output directory for the economic data exists, and creates it if it does not.

  • Assigns the provided economic data and risk data to the corresponding slots in the RSVProgramme object.

  • Extracts unique outcomes from the economic data and assigns them to the outcomes_vec slot.

  • Stops execution if no outcomes are detected in the economic data.

  • Generates samples of outcomes and assigns them to the samples_outcomes and samples_outcomes_VHR slots.

Examples

if (FALSE) { # \dontrun{
  rsv_programme <- new("RSVProgramme")
  rsv_programme <- add_economics(rsv_programme, "econ_data", econ_raw_df, risks_raw_df, risks_vhr_raw_df)
} # }