div_add_median_label: Adds a column with new labels (H)igh and (L) for a given...

Description Usage Arguments Value Examples

View source: R/div_add_median_label.R

Description

This function calculates the entropy of a system with discrete states

Usage

1
2
3
4
5
6
7
div_add_median_label(
  d,
  colName = "age",
  value1 = "T",
  value2 = "F",
  newColName = "isYoung"
)

Arguments

d

tibble, a tibble with team data columns as defined in the documentation (at least the column colName (as set by next parameter), 'grade', and 'jobID')

colName

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

value1

character, the label to be used for the first half of observations (the smallest ones)

value2

character, the label to be used for the second half of observations (the biggest ones)

newColName

the value in new column name that will hold the values value1 and value2

Value

dataframe (with columns grade, jobID, salary_selectedValue, salary_others, n_selectedValue, 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.