Warning: package 'pROC' was built under R version 4.3.3
Warning: package 'zoo' was built under R version 4.3.2
Warning: package 'aod' was built under R version 4.3.2
Warning: package 'readxl' was built under R version 4.3.2
Warning: package 'ggplot2' was built under R version 4.3.3
Warning: package 'glmtoolbox' was built under R version 4.3.3
Warning: package 'logistf' was built under R version 4.3.3
Warning: package 'mfx' was built under R version 4.3.3
Warning: package 'sandwich' was built under R version 4.3.2
Warning: package 'lmtest' was built under R version 4.3.2
Warning: package 'betareg' was built under R version 4.3.3
Warning: package 'maxLik' was built under R version 4.3.2
Warning: package 'miscTools' was built under R version 4.3.2
Warning: package 'ResourceSelection' was built under R version 4.3.3
Warning: package 'questionr' was built under R version 4.3.3
Data set overview
The purpose of this research is to determine what factors influence whether an open job position in polish civil job market will find a candidate or not. Job postings in polish civil market are set for a finite amount of time. After closure of a job posting there are interviews and information about hiring or not hiring a candidate is released to public.
We have performed web scraping of job postings from the website: . It is a governmental website with all job postings in governmental institutions. We have gathered 2500 observations from November and December 2023. Some observations have been dropped due to posting cancellations. In the end 2107 job postings have been used. Below is a list of gathered variables:
y - result of a job posting. Binary variable with information whether a candidate was hired,
x1 - city class. The city of workplace have been put in one of five brackets based on the population of the city (0 - below 100 000 inhabitants, 1 - 100 001 - 250 000 inhabitants, 2 - 250 001 - 500 000 inhabitants, 3 - 500 001 - 1 000 000 inhabitants and 4 over 1 000 000 inhabitants. The last bracket accounts for Warsaw only as most of governmental institutions (and job postings) are in the capital city),
x2 - job group. In the polish civil market all job positions are in accordance to law regulation that describes all job positions and to what grade they belong to. The higher the grade the higher the qualifications and pay. There are 5 levels, but in our data set there were no job postings with highest grade,
x3 - number of positions. In some cases there were more than one position needed per job posting,
x4 - wage. As not all job postings had the wage displayed, we considered it a binary variable - whether the wage was given or not,
x5 - time. Proportion of full time of job posting,
x6 - education. Binary variable, where means 0 not requiring higher education, 1 otherwise,
x7 - Driving. Binary variable, where 0 means not requiring driving license, 1 otherwise,
x8 - English. Binary variable, where 0 means not requiring English language, 1 otherwise,
x9 - Hybrid. Binary variable, where 0 means no possibility of remote work, 1 otherwise,
x10 - Days_on. Amount of days between job posting introduction and date by which the application documents may be submitted,
x11 - Experience. Amount of experience required for the job position in years.
Data analysis
Some initial data analysis has been done beforehand, on the data acquisition level, here we are going to explore the data set further.
project %>%ggplot(aes(x=clean_result))+geom_bar()+labs(y="Count", x ="Job posting result")
selected_columns <-c("City_class", "Job_group", "education_clean","Number_of_positions", "Wage_clean", "driving_clean", "english_clean", "hybrid_clean")plots <-list()for (col in selected_columns) {# Create a bar plot for the current column plots[[col]] <-ggplot(project, aes_string(x = col)) +geom_bar() +labs(title =paste(col))}
Warning: `aes_string()` was deprecated in ggplot2 3.0.0.
ℹ Please use tidy evaluation idioms with `aes()`.
ℹ See also `vignette("ggplot2-in-packages")` for more information.
selected_columns <-c("Days_on", "experience_clean", "time_clean")plots <-list()for (col in selected_columns) {# Create a bar plot for the current column plots[[col]] <-ggplot(project, aes_string(x = col)) +geom_boxplot(fill ="skyblue", color ="black") +labs(title =paste(col))}combined_plot <-do.call(gridExtra::grid.arrange, c(plots, ncol =2))
print(combined_plot)
TableGrob (2 x 2) "arrange": 3 grobs
z cells name grob
Days_on 1 (1-1,1-1) arrange gtable[layout]
experience_clean 2 (1-1,2-2) arrange gtable[layout]
time_clean 3 (2-2,1-1) arrange gtable[layout]
Increasing the job grade by one increases the probability of hiring a candidate by 5.1 percentage points.
Additional position for a job posting increases the probability of hiring a candidate by 8.1 percentage points.
Requiring higher education decreases the probability of hiring a candidate by 37.6 percentage points.
Requiring driving license decreases the probability of hiring a candidate by 19.3 percentage points.
Possibility of remote work increases the probability of hiring a candidate by 10.2 percentage points.
Additional day between opening job posting and the end of acquiring application documents decreases the probability of hiring a candidate by 1 percentage point.
Additional year of experience required decreases the probability of hiring a candidate by 3.8 percentage points.
job group is 1.23, meaning that for each increment of job grade, the odds of successful employment increases by a factor of 1.23, holding all other variables constant,
number of positions is 1.4, meaning that for every additional job position, the odds of successful employment increases by a factor of 1.4, holding all other variables constant,
education is 0.19, meaning that requirement of higher education decreases the odds of successful employment by a factor of 0.19, holding all other variables constant,
driving is 0.46, meaning that requirement of driving license decreases the odds of successful employment by a factor of 0.46, holding all other variables constant,
hybrid is 1.53, meaning that possibility of remote work increases the odds of successful employment by a factor of 0.19, holding all other variables constant,
days on is 0.96, meaning that each additional day between the opening and closing job posting decreases the odds of successful employment by a factor of 0.96, holding all other variables constant,
experience is 0.86, meaning that each year of required experience decreases the odds of successful employment by a factor of 0.86, holding all other variables constant.
Call:
glm(formula = y ~ yhat + yhat2, family = binomial(link = model$family$link))
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.02969 0.06266 -0.474 0.636
yhat 0.96996 0.06907 14.042 <2e-16 ***
yhat2 0.04862 0.06350 0.766 0.444
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 2891.9 on 2106 degrees of freedom
Residual deviance: 2530.0 on 2104 degrees of freedom
AIC: 2536
Number of Fisher Scoring iterations: 4
summary(linktest_result)
Call:
glm(formula = y ~ yhat + yhat2, family = binomial(link = model$family$link))
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.02969 0.06266 -0.474 0.636
yhat 0.96996 0.06907 14.042 <2e-16 ***
yhat2 0.04862 0.06350 0.766 0.444
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 2891.9 on 2106 degrees of freedom
Residual deviance: 2530.0 on 2104 degrees of freedom
AIC: 2536
Number of Fisher Scoring iterations: 4
Yhat2 is not statistically significant (p-value equal to 0.444 which is greater than significance level being 0.05). It means that in this model there is no problem with heteroscedasticity or non-linearity.
McKelvey-Zavoina statistic is equal to 0.21. It means that out logistic regression model explains a moderate proportion of the variability in the result variable.