Summarize costs and quality-adjusted life-years (QALYs) given output simulated from an economic model. The summary output is used to perform cost-effectiveness analysis with cea() and cea_pw().

summarize_ce(costs, qalys, by_grp = FALSE)

## Arguments

costs Simulated costs by category (objects of class costs). Simulated QALYs (objects of class qalys). If TRUE, then costs and QALYs are computed by subgroup. If FALSE, then costs and QALYs are aggregated across all patients (and subgroups).

## Value

An object of class ce.

## Details

If mean costs and/or QALYs have already been computed (i.e., an average within a population), then there must be one observation for each discount rate (dr), PSA sample (sample), treatment strategy (strategy_id), and health state (state_id). Alternatively, there can be a column denoting a patient (patient_id), in which case outcomes will first be averaged across patients. A grp_id column can also be used so that outcomes are computed for each subgroup (if by_grp = TRUE); otherwise it is assumed that there is only one subgroup.