Runs a salary analysis according to the Swiss standard analysis model
analysis(
data,
reference_month,
reference_year,
usual_weekly_hours = NULL,
female_spec = "F",
male_spec = "M",
age_spec = NULL,
entry_date_spec = NULL
)
object of type analysis_model
with the following
elements
params
: The set of original parameters passed to the function
data_original
: The original data passed by the user in the
data
parameter
data_clean
: The cleaned up data which was used for the analysis
data_errors
: The list of errors which were found upon checking the data
results
: The result of the standard analysis model
a data.frame of employees as produced by read_data
an integer representing the reference month, i.e. the month for which we analyze the salaries
an integer representing the reference year, i.e. the year for which we analyze the salaries
an optional numeric representing the usual weekly
working hours (missing values in weekly_hours
are replaced by
usual_weekly_hours
; if NULL
, the missing values are not
replaced)
an optional string or numeric representing the way women
are encoded in the data
an optional string or numeric representing the way men are
encoded in the data
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)
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)
results <- analysis(data = datalist_example, reference_month = 1,
reference_year = 2019, usual_weekly_hours = 40, female_spec = "F",
male_spec = "M", age_spec = "age")
Run the code above in your browser using DataLab