This function generates a data frame with data for a team (with salaries, gender, FTE, etc). This is a good start to test the package and to experiment what level of bias will be visible in the paygap for example.
div_fake_team(
seed = 100,
N = 200,
genders = c("F", "M", "O"),
gender_prob = c(0.4, 0.58, 0.02),
gender_salaryBias = c(1, 1.1, 1),
jobIDs = c("sales", "analytics"),
jobID_prob = c(0.6, 0.4),
citizenships = c("Polish", "German", "Italian", "Indian", "Other"),
citizenship_prob = c(0.6, 0.2, 0.1, 0.05, 0.05)
)numeric, the seed to be used in set.seed()
numeric, the size of the team to be used (default = 200)
character, a vector of the genders to be used
numeric, relative probabilities of the different genders to occur (must have the same length as 'genders')
numeric, vector with the relative salaries of the different genders (must have the same length as 'genders')
character, a vector with the labels of the job categories in the team (they will appear in each grade)
numeric, a vector with the relative sizes of the different jobs in the team (must have the same length as 'jobIDs')
character, a vector of the citizenships to be generated
numeric, relative probabilities of the different citizenships to occur (must have the same length as 'citizenships')
dataframe (employees of the random team)
# NOT RUN {
library(div)
d <- div_fake_team()
head(d)
diversity(table(d$gender))
# }
Run the code above in your browser using DataLab