Aggregate Posterior Profile Draws into R_ALL and R_NF Summaries
Source:R/daly_resistance_profiles.R
aggregate_profiles_for_daly.RdSummarises draw-level R_ALL and R_NF values from
compute_event_profile_probabilities() into posterior mean and
credible interval per hospital x pathogen x profile combination.
All \(2^D\) profiles are present in the output (inherited from the
complete enumeration in the simulation step).
Usage
aggregate_profiles_for_daly(
profile_output,
hospital_col = "hospital",
pathogen_col = "pathogen",
estimand = "observed_stewardship_event_mix",
ci_level = 0.95
)Arguments
- profile_output
List returned by
compute_event_profile_probabilities().- hospital_col
Character. Hospital column in
aggregate_draws. Must match the upper RE column used during fitting. Default"hospital".- pathogen_col
Character. Pathogen column. Default
"pathogen".- estimand
Character. Estimand label to attach to output. Default
"observed_stewardship_event_mix".- ci_level
Numeric. Credible interval coverage. Default
0.95.