wVal - Main Functions

Wrappers:

wval_sc2()

Wrapper function for SC2 wVal calculations, generally following most up-to-date SARS-CoV-2 wVal methodology per CDC definition.

Parameters:

  • ww_df_in, normal_yesno, and choose_norm must be provided to this function.

  • method_choice = “cdc_v4”, org = “SC2_v2”, week_required = 8, method = “median”, outlier_removal = “yes” are already set to run the most recent cdc wval sc2 methodology

  • site_to_region_crosswalk = NA, pop_serve_num = NA, sample_type_list = NA, testing_site_type_list = NA can be set if desired

Function:


wval_sc2 <- function(ww_df_in,
                     normal_yesno,
                     choose_norm,
                     site_to_region_crosswalk = NA,
                     outlier_removal = "yes",
                     method_choice = "cdc_v4",
                     week_required = 8,
                     org = "SC2_v2",
                     method = "median",
                     pop_serve_num = NA,
                     sample_type_list = NA,
                     testing_site_type_list = NA){


  wval1 <- r0100_inclusion_exclusion(ww_df_in, pop_serve_num,
                                     sample_type_list,
                                     testing_site_type_list)

  wval1 <- r0200_normalize(wval1, normal_yesno,
                           choose_norm)

  wval1 <- r0300_logtransform(wval1, outlier_removal)

  wval1 <- r0400_baselineassignment(wval1, method_choice, week_required)

  wval1 <- r0500_wval_sitecalc(wval1, org)

  wval1 <- r0600_wval_regioncalc(wval1, site_to_region_crosswalk, method, org)

  return(wval1)
}

Back to top