Assign Per-Class LOS RR to Resistance Profiles (Max Rule)
Source:R/burden.R, R/yll.R
assign_rr_to_profiles.RdFor each resistance profile delta (from compute_resistance_profiles()), determines the profile-level RR_kd_LOS using the GBD max rule: RR_kd_LOS = max over c in C_R(d) of RR_kc_LOS [if C_R(d) non-empty] = 1 [if d = all-susceptible] where C_R(d) = {c : d_c = 1}. The CI reported for each profile is that of its dominant (max-RR) class.
For each resistance profile delta, determines the profile-level RR using
the GBD max rule: RR_kd = max over resistant classes of RR_kc.
The CI reported for each profile is that of its dominant (max-RR) class.
Also used for mortality ORs when called with rr_col = "OR_death".
Usage
assign_rr_to_profiles(
profiles_output,
rr_table,
pathogen_col = "pathogen",
class_col = "antibiotic_class",
rr_col = "RR_LOS",
fallback_rr = 1
)
assign_rr_to_profiles(
profiles_output,
rr_table,
pathogen_col = "pathogen",
class_col = "antibiotic_class",
rr_col = "RR_LOS",
fallback_rr = 1
)Arguments
- profiles_output
Named list from
compute_resistance_profiles().- rr_table
Data frame from
fit_mortality_rr_logistic()or a LOS RR table. Must havepathogen_col,class_col,rr_col, and optionallyCI_lower/CI_upper.- pathogen_col
Character. Default
"pathogen".- class_col
Character. Default
"antibiotic_class".- rr_col
Character. Default
"RR_LOS". Use"OR_death"for mortality.- fallback_rr
Numeric. RR for classes with no match. Default
1.