div_paygap {div}R Documentation

Function to calculate the paygap as a ratio.

Description

This function calculates the entropy of a system with discrete states

Usage

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

df <- div_paygap(div_fake_team())
df

[Package div version 0.3.1 Index]