div_paygap: Function to calculate the paygap as a ratio.

Description Usage Arguments Value Examples

View source: R/div_paygap.R

Description

This function calculates the entropy of a system with discrete states

Usage

1
div_paygap(d, x = "gender", y = "salary", x_ctrl = "F", ctrl_var = "age")

Arguments

d

tibble, a tibble with columns as definded

x

the name of the columns that contains the factor object to be used as explaining dimension for the paygap (defaults to 'gender')

y

the name of the columns that contains the numeric value to be used to calculate the paygap (could be salary or bonus for example)

x_ctrl

the value in the column defined by x that should be isolated (this versus the others), defaults to 'F'

ctrl_var

a control variable to be added (shows median per group for that variable)

Value

dataframe (with columns grade, jobID, salary_x_ctrl, salary_others, n_x_ctrl, n_others, paygap, confidence) , where "confidence" is one of the following: NA = not available (numbers are too low), "" = no bias detectable, "." = there might be some bias, but we're not sure, "*" = bias detected wit some degree of confidence, "**" = quite sure there is bias, "***" = trust us, this is biased.

Examples

1
2

div documentation built on May 6, 2021, 9:06 a.m.

Related to div_paygap in div...