analysis: Run a Salary Analysis

Description Usage Arguments Value Examples

View source: R/analysis.R

Description

Runs a salary analysis according to the Swiss standard analysis model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
analysis(
  data,
  reference_month,
  reference_year,
  female_spec = "F",
  male_spec = "M",
  age_spec = NULL,
  entry_date_spec = NULL,
  ignore_plausibility_check = FALSE,
  prompt_data_cleanup = FALSE
)

Arguments

data

a data.frame of employees as produced by read_data

reference_month

an integer representing the reference month, i.e. the month for which we analyze the salaries

reference_year

an integer representing the reference year, i.e. the year for which we analyze the salaries

female_spec

an optional string or numeric representing the way women are encoded in the data

male_spec

an optional string or numeric representing the way men are encoded in the data

age_spec

an optional string to specify the way age is encoded in the data (NULL will try to automatically infer the age format, "age" implies that the age is specified as the age of a person, "birthyear" implies that the age is specified as the year of birth of a person, and "birthdate" implies that the age is specified as the date of birth of a person)

entry_date_spec

an optional string to specify the way entry_date is encoded in the data (NULL will try to automatically infer the format, "years" implies that the entry_date is specified as the number of years for which the person has been in the company, "entry_year" implies that the entry_date is specified as the year of the entry date of the person, "entry_date" implies that the age is specified as the date of entry of the person)

ignore_plausibility_check

a boolean indicating whether the plausibility of the data should be checked or whether all correct data is considered plausible

prompt_data_cleanup

a boolean indicating whether a prompt will pop up to enforce cleaning the data until all data is correct

Value

object of type analysis_model with the following elements

Examples

1
2
results <- analysis(data = datalist_imprimerie, reference_month = 1,
   reference_year = 2019, female_spec = 1, male_spec = 2)

logib documentation built on Nov. 21, 2021, 9:08 a.m.