Aggregates a burden variable across combinations of grouping variables within a synthetic population.
Usage
make_summary_of_agents(
dt,
burden_col,
group_by_cols,
count_col = "Persons",
mean_col = "Mean",
total_col = "Total"
)Arguments
- dt
A
data.tablecontaining synthetic agents.- burden_col
Name of the burden variable.
- group_by_cols
Character vector of grouping variables.
- count_col
Name of the output count column. Defaults to
"Persons".- mean_col
Name of the output mean column. Defaults to
"Mean".- total_col
Name of the output total burden column. Defaults to
"Total".
Details
For each grouping combination, the function calculates:
Number of agents.
Mean burden.
Total burden.
This function is intended as a low-level utility used in burden and service-planning workflows.
See also
Other burden modelling:
make_avertable_summary(),
make_burden_lookup()
Examples
if (FALSE) { # \dontrun{
summary_dt <- make_summary_of_agents(
dt = agents_dt,
burden_col = "DALYBurden",
group_by_cols = c(
"AgeGroup7",
"SEXP"
)
)
} # }
