ip2020[[2]][[3]] %>%
mutate(effectifs_cum = 1 - cumsum(effectifs)/sum(effectifs)) %>%
filter(effectifs_cum <= 0.2) %>%
ggplot(.) + theme_minimal() + xlab("Net monthly wage") + ylab("Countercumulative Distribution Function") +
geom_point(aes(x = salaires_max, y = effectifs_cum)) +
scale_x_log10(breaks = c(1000, 1500, 2000, 3000, 4000, 5000, 6000, 7000, 8000),
labels = dollar_format(prefix = "", accuracy = 1, suffix = " €")) +
scale_y_log10(breaks = c(seq(0.01, 0.05, 0.01), 0.1, 0.2, 0.4, 1)) +
geom_function(aes(colour = paste0("Slope (Coefficient of Pareto): ", round(fit1$coefficients[2],3))), fun = function(x) exp(fit1$coefficients[1] + fit1$coefficients[2]*log(x))) +
theme(legend.position = c(0.8, 0.9),
legend.title = element_blank())