Computes the population attributable fraction (PAF) for length of stay from a named list of profile data frames, each containing resistance-profile probabilities and profile-level relative risk of LOS.
Usage
daly_calc_paf_los(
profiles_with_rr,
probability_col = "probability",
rr_profile_col = "RR_LOS_profile",
profile_col = "profile"
)Arguments
- profiles_with_rr
Named list returned by
assign_rr_to_profiles()orfilter_profiles_to_rr_classes(). Each entry is a data frame of resistance profiles for one pathogen.- probability_col
Character. Column name for profile probability (must sum to 1 within each pathogen). Default
"probability".- rr_profile_col
Character. Column name for profile-level LOS relative risk. Default
"RR_LOS_profile".- profile_col
Character. Column name for the profile identifier. Default
"profile".