Function to compare M vs F salaries within a department

stats_mf(data = sals18)

Arguments

data

A dataframe of ISU salary data with academic department info. Default is for year 2018. Column names must include 'department', 'position', 'gender', and 'total_salary_paid'. If you want to use aggregated/simplified position categories created by the function 'get_profs', you must change the name of the new column 'XX' to 'position' in order to run it through this function

Value

A dataframe of department, nested data, p-value for gender pay gap after accounting for position, and a verdict

Examples

data(sals18) sals18 %>% dplyr::filter(department == "AGRONOMY") %>% dplyr::filter(stringr::str_detect(position, "PROF")) %>% stats_mf()
#> # A tibble: 1 x 5 #> department data term p_val verdict #> <chr> <list> <chr> <dbl> <chr> #> 1 AGRONOMY <tibble [40 x 10]> gender 0.193 boo