Skip to contents

Runs all steps of the risk adjustment calculations and returns the results as a named list.

Usage

compute_ra(
  Year,
  ind_data = NULL,
  pcg_list = NULL,
  Clean_Steps = FALSE,
  export_objects = "all"
)

Arguments

Year

An integer specifying the year of the risk adjustment

ind_data

data.frame or data.table object. Uses synthetic test data included in the package if NULL.

pcg_list

Either a path to an .xlsx with the PCG list, or a data.frame/data.table Uses the public PCG list of year 2022 if NULL.

Clean_Steps

Boolean. Whether to clean up intermediate results.

export_objects

A character vector naming objects to export. By default, all objects are exported

Value

A list of objects specified in export_objects.

Author

Magnus Vieten, Yannick Schwarz, Thomas Fischer

Examples

if (FALSE) { # \dontrun{
res <- compute_ra(2022, Clean_Steps = TRUE)
} # }