{"id":3339,"date":"2019-05-23T19:17:39","date_gmt":"2019-05-23T17:17:39","guid":{"rendered":"https:\/\/geekosas.com\/?p=3339"},"modified":"2026-05-23T19:18:37","modified_gmt":"2026-05-23T17:18:37","slug":"gender-pay-gap-in-technology","status":"publish","type":"post","link":"https:\/\/geekosas.com\/index.php\/2019\/05\/23\/gender-pay-gap-in-technology\/","title":{"rendered":"Gender Pay Gap in Technology"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The Gender Pay Gap is the difference that exists on average in the salaries of Men vs. Women.<\/p>\n\n\n<p class=\"wp-block-paragraph\">Today there are people who attribute this to discrimination, while others say it is due to the decisions that men on average make versus those of women.<\/p>\n\n\n<p class=\"wp-block-paragraph\">Since both opinions have merit, I decided to conduct an analysis on some database that would allow me to reveal the reality. That&#8217;s when I came across the database from the survey that StackOverflow conducts every year. The interesting thing about it is that besides collecting gender and salary, it also collects many other attributes such as: favorite operating system, programming languages, years of experience, etc.<\/p>\n\n\n<p class=\"wp-block-paragraph\">The survey is answered by people in the technology field from all over the world and is conducted annually, but we will focus on the data from the year 2018 for the United States, where the individuals are employees (not independent), with annual salaries between USD 50,000 and USD 200,000. This is because it is where the most surveys were answered and where the majority of salaries are concentrated.<\/p>\n\n\n<p class=\"wp-block-paragraph\">In this analysis, I will only be guided by Advanced Analytics tools and interpret their results, but you, the readers, are free to debate the topic.<\/p>\n\n\n<h2 class=\"wp-block-heading\">Evidence of the Salary Gap<\/h2>\n\n\n<p class=\"wp-block-paragraph\">To begin, I will start by showing that there is indeed a difference in the average annual salaries of men and women:<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: r; title: ; notranslate\" title=\"\">\naux = dataset %&gt;%\n  group_by(Male) %&gt;%\n  summarise(salario = mean(ConvertedSalary,na.rm=T),\n            number = n()) %&gt;%\n  filter(!is.na(Male))\nggplot(aux,(aes(Male,salario))) + geom_bar(stat = &#039;identity&#039;, fill = &#039;dark orange&#039;) + ggtitle(&#039;Salario Promedio por Genero&#039;) + scale_fill_tableau() \n<\/pre><\/div>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"960\" data-attachment-id=\"2657\" data-permalink=\"https:\/\/geekosas.com\/index.php\/es\/2019\/02\/20\/gender-pay-gap-en-tecnologia\/salary-gap-1-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-1-1.png?fit=1344%2C960&amp;ssl=1\" data-orig-size=\"1344,960\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"salary-gap-1-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-1-1.png?fit=1024%2C731&amp;ssl=1\" src=\"https:\/\/i2.wp.com\/www.geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-1-1.png?fit=810%2C578\" alt=\"\" class=\"wp-image-2657\" srcset=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-1-1.png?w=1344&amp;ssl=1 1344w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-1-1.png?resize=300%2C214&amp;ssl=1 300w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-1-1.png?resize=768%2C549&amp;ssl=1 768w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-1-1.png?resize=1024%2C731&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n<p class=\"wp-block-paragraph\">If we look at its distribution, we notice that women have a greater concentration in lower salaries:<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: r; title: ; notranslate\" title=\"\">\nggplot(filter(dataset,!is.na(Male)),aes(ConvertedSalary,group = Male, fill = Male)) +\n  geom_density(alpha= 0.3,kernel = &#039;epanechnikov&#039;) +\n  ggtitle(&#039;Distribucion de Sueldo por Genero&#039;)  +\n  scale_fill_tableau() \n<\/pre><\/div>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"960\" data-attachment-id=\"2658\" data-permalink=\"https:\/\/geekosas.com\/index.php\/es\/2019\/02\/20\/gender-pay-gap-en-tecnologia\/salary-gap-2-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-2-1.png?fit=1344%2C960&amp;ssl=1\" data-orig-size=\"1344,960\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"salary-gap-2-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-2-1.png?fit=1024%2C731&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-2-1.png?fit=810%2C578\" alt=\"\" class=\"wp-image-2658\" srcset=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-2-1.png?w=1344&amp;ssl=1 1344w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-2-1.png?resize=300%2C214&amp;ssl=1 300w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-2-1.png?resize=768%2C549&amp;ssl=1 768w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-2-1.png?resize=1024%2C731&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n<p class=\"wp-block-paragraph\">It is easier to see this effect if we look at the logarithm of salaries, where it is clear that women&#8217;s salaries are more to the left than men&#8217;s:<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: r; title: ; notranslate\" title=\"\">\nggplot(filter(dataset,!is.na(Male)),aes(log10(ConvertedSalary),group = Male, fill = Male)) +\n  geom_density(alpha= 0.3,kernel=&#039;epanechnikov&#039;) +\n  ggtitle(&#039;Distribucion de Log Sueldo por Genero&#039;)  +\n  scale_fill_tableau() \n<\/pre><\/div>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"960\" data-attachment-id=\"2659\" data-permalink=\"https:\/\/geekosas.com\/index.php\/es\/2019\/02\/20\/gender-pay-gap-en-tecnologia\/salary-gap-3-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-3-1.png?fit=1344%2C960&amp;ssl=1\" data-orig-size=\"1344,960\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"salary-gap-3-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-3-1.png?fit=1024%2C731&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-3-1.png?fit=810%2C578\" alt=\"\" class=\"wp-image-2659\" srcset=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-3-1.png?w=1344&amp;ssl=1 1344w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-3-1.png?resize=300%2C214&amp;ssl=1 300w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-3-1.png?resize=768%2C549&amp;ssl=1 768w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-3-1.png?resize=1024%2C731&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n<p class=\"wp-block-paragraph\">Finally, if we perform a one-tailed means test, it yields a p-value = 0, so it can be stated that the means are significantly different.<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: r; title: ; notranslate\" title=\"\">\nt.test(ConvertedSalary ~ Male, filter(dataset,!is.na(Male)),alternative = &#039;less&#039;)\n<\/pre><\/div>\n\n<pre class=\"wp-block-code\"><code>t.test(ConvertedSalary ~ Male, filter(dataset,!is.na(Male)),alternative = 'less')\n##\n##  Welch Two Sample t-test\n##\n## data:  ConvertedSalary by Male\n## t = -8.452, df = 917.2, p-value &lt; 2.2e-16\n## alternative hypothesis: true difference in means is less than 0\n## 95 percent confidence interval:\n##       -Inf -7793.837\n## sample estimates:\n## mean in group FALSE  mean in group TRUE\n##            95684.52           105363.99<\/code><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Analysis with Trees<\/h2>\n\n\n<p class=\"wp-block-paragraph\">To start, we will use Machine Learning to find the variables that best explain a programmer&#8217;s salary, to see if gender appears.<\/p>\n\n\n<p class=\"wp-block-paragraph\">We can see that the most important variables are:<\/p>\n\n\n<ul class=\"wp-block-list\"><li><strong>YearsCodingProf<\/strong>: Years of professional coding? where more than 5 years means an increase in average salary.<\/li><li><strong>OperatingSystem<\/strong>: What operating system do you work on? where Using Windows means an increase in average salary.<\/li><li><strong>AssessBenefits2<\/strong>: &#8220;How willing are you to share company shares? 1 is more&#8221;, where people willing to have company shares have a higher average salary.<\/li><\/ul>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: r; title: ; notranslate\" title=\"\">\nfitTree = rpart(ConvertedSalary ~ .,dataset)\nfancyRpartPlot(fitTree)\n\n<\/pre><\/div>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"960\" data-attachment-id=\"2665\" data-permalink=\"https:\/\/geekosas.com\/index.php\/es\/2019\/02\/20\/gender-pay-gap-en-tecnologia\/salary-gap-6-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-6-1.png?fit=1344%2C960&amp;ssl=1\" data-orig-size=\"1344,960\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"salary-gap-6-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-6-1.png?fit=1024%2C731&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-6-1.png?fit=810%2C578\" alt=\"\" class=\"wp-image-2665\" srcset=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-6-1.png?w=1344&amp;ssl=1 1344w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-6-1.png?resize=300%2C214&amp;ssl=1 300w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-6-1.png?resize=768%2C549&amp;ssl=1 768w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-6-1.png?resize=1024%2C731&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n<p class=\"wp-block-paragraph\">Since gender does not appear in the tree, let&#8217;s see what differences exist between men and women in these three variables.<\/p>\n\n\n<p class=\"wp-block-paragraph\">The first thing we can see is that on average women have almost 3 years less programming experience than men.<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: r; title: ; notranslate\" title=\"\">\naux = dataset %&gt;%\n  group_by(Male) %&gt;%\n  summarise(YearsCodingProf = mean(YearsCodingProf,na.rm=T),\n            AssessBenefits2 = mean(AssessBenefits2,na.rm=T),\n            number = n()) %&gt;%\n  filter(!is.na(Male))\nggplot(aux,(aes(Male,YearsCodingProf))) + geom_bar(stat = &#039;identity&#039;, fill = &#039;dark orange&#039;) + ggtitle(&#039;A\u00f1os Promedio Programando&#039;)\n<\/pre><\/div>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"960\" data-attachment-id=\"2666\" data-permalink=\"https:\/\/geekosas.com\/index.php\/es\/2019\/02\/20\/gender-pay-gap-en-tecnologia\/salary-gap-7-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-7-1.png?fit=1344%2C960&amp;ssl=1\" data-orig-size=\"1344,960\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"salary-gap-7-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-7-1.png?fit=1024%2C731&amp;ssl=1\" src=\"https:\/\/i1.wp.com\/www.geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-7-1.png?fit=810%2C578\" alt=\"\" class=\"wp-image-2666\" srcset=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-7-1.png?w=1344&amp;ssl=1 1344w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-7-1.png?resize=300%2C214&amp;ssl=1 300w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-7-1.png?resize=768%2C549&amp;ssl=1 768w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-7-1.png?resize=1024%2C731&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n<p class=\"wp-block-paragraph\">On the other hand, women have a lower preference for having company shares:<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: r; title: ; notranslate\" title=\"\">\nggplot(aux,(aes(Male,AssessBenefits2))) + geom_bar(stat = &#039;identity&#039;, fill = &#039;dark orange&#039;) + ggtitle(&#039;Preferencia por Acciones de Empresa, Menor es Mayor Preferencia&#039;)\n<\/pre><\/div>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"960\" data-attachment-id=\"2667\" data-permalink=\"https:\/\/geekosas.com\/index.php\/es\/2019\/02\/20\/gender-pay-gap-en-tecnologia\/salary-gap-8-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-8-1.png?fit=1344%2C960&amp;ssl=1\" data-orig-size=\"1344,960\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"salary-gap-8-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-8-1.png?fit=1024%2C731&amp;ssl=1\" src=\"https:\/\/i1.wp.com\/www.geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-8-1.png?fit=810%2C578\" alt=\"\" class=\"wp-image-2667\" srcset=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-8-1.png?w=1344&amp;ssl=1 1344w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-8-1.png?resize=300%2C214&amp;ssl=1 300w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-8-1.png?resize=768%2C549&amp;ssl=1 768w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-8-1.png?resize=1024%2C731&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n<p class=\"wp-block-paragraph\">And finally, men on average prefer Windows while women prefer Apple:<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: r; title: ; notranslate\" title=\"\">\naux = dataset %&gt;%\n  filter(!is.na(OperatingSystem) &amp; !is.na(Male) ) %&gt;%\n  group_by(Male,OperatingSystem) %&gt;%\n  summarise(number = n()) %&gt;%\n  group_by(Male) %&gt;%\n  mutate(os_portion = number\/sum(number))\nggplot(aux,aes(Male,os_portion, fill = OperatingSystem)) + geom_bar(position = &#039;stack&#039;,stat = &#039;identity&#039;) +\n  ggtitle(&#039;Porcion de Sistema operativo por Genero&#039;) + scale_fill_tableau()\n<\/pre><\/div>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"960\" data-attachment-id=\"2668\" data-permalink=\"https:\/\/geekosas.com\/index.php\/es\/2019\/02\/20\/gender-pay-gap-en-tecnologia\/salary-gap-9-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-9-1.png?fit=1344%2C960&amp;ssl=1\" data-orig-size=\"1344,960\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"salary-gap-9-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-9-1.png?fit=1024%2C731&amp;ssl=1\" src=\"https:\/\/i2.wp.com\/www.geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-9-1.png?fit=810%2C578\" alt=\"\" class=\"wp-image-2668\" srcset=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-9-1.png?w=1344&amp;ssl=1 1344w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-9-1.png?resize=300%2C214&amp;ssl=1 300w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-9-1.png?resize=768%2C549&amp;ssl=1 768w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-9-1.png?resize=1024%2C731&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n<p class=\"wp-block-paragraph\">Now if we try to reverse the problem and try to predict gender based on the variables to see how they differ (mainly to see if salary appears), we can see that:<\/p>\n\n\n<ul class=\"wp-block-list\"><li>The variable that best discriminates is <strong>AssessJob9<\/strong>, Women prefer inclusive work environments:<\/li><li>On average women have fewer years programming (professionally or non-professionally) than men.<\/li><li>Finally <strong>Hobby<\/strong> represents whether the respondent programs as a hobby or not, where men on average do it more often.<\/li><\/ul>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: r; title: ; notranslate\" title=\"\">\nfitTree = rpart(Male ~ .,dataset, cp = 0.008)\nfancyRpartPlot(fitTree) \n<\/pre><\/div>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"960\" data-attachment-id=\"2689\" data-permalink=\"https:\/\/geekosas.com\/index.php\/es\/2019\/02\/20\/gender-pay-gap-en-tecnologia\/unnamed-chunk-10-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/unnamed-chunk-10-1.png?fit=1344%2C960&amp;ssl=1\" data-orig-size=\"1344,960\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"unnamed-chunk-10-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/unnamed-chunk-10-1.png?fit=1024%2C731&amp;ssl=1\" src=\"https:\/\/i1.wp.com\/www.geekosas.com\/wp-content\/uploads\/2019\/02\/unnamed-chunk-10-1.png?fit=810%2C578\" alt=\"\" class=\"wp-image-2689\" srcset=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/unnamed-chunk-10-1.png?w=1344&amp;ssl=1 1344w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/unnamed-chunk-10-1.png?resize=300%2C214&amp;ssl=1 300w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/unnamed-chunk-10-1.png?resize=768%2C549&amp;ssl=1 768w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/unnamed-chunk-10-1.png?resize=1024%2C731&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n<h2 class=\"wp-block-heading\">Using Random Forest<\/h2>\n\n\n<p class=\"wp-block-paragraph\">Random Forest will allow us 2 things: measure the importance of variables in the model (it does this by measuring how much the model worsens when the variable is not included in the tree) and on the other hand, simulate how much a person&#8217;s salary changes if their gender changes.<\/p>\n\n\n<p class=\"wp-block-paragraph\">When performing the variable importance analysis, the first thing we detect is that when trying to predict salary, gender does not appear among the first 10 variables, remaining approximately in position 60. For analysis, we plot the 10 most important in magnitude.<\/p>\n\n\n<p class=\"wp-block-paragraph\">Three of the four most important variables are related to years, whether of life or programming. We see AssessBenefits2 again and people with the position of Engineering Manager appear. After that, the variables are already of little relevance so we won&#8217;t look at them.<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: r; title: ; notranslate\" title=\"\">\nsrv = h2o.init(nthreads = -1)\nh2o.aux = mutate_if(dataset,is.ordered,as.character)\ndataset.h2o = as.h2o(h2o.aux,destination_frame = &quot;dataset_train&quot;)\nsalary_fit = h2o.randomForest(y = &quot;ConvertedSalary&quot;,\n                              x = setdiff(colnames(dataset),&quot;ConvertedSalary&quot;),\n                              training_frame = dataset.h2o,\n                              model_id = &quot;salary_balanced&quot;,\n                              ntrees = 1000)\nh2o.saveModel(salary_fit,&#039;data\/models\/&#039;,force = T)\nimportance = data.frame(h2o.varimp(salary_fit))\nimportance = head(importance,10)\nggplot(importance,aes(variable,scaled_importance)) +\n  geom_bar(stat = &#039;identity&#039;,fill=&#039;dark orange&#039;) +\n  theme(axis.text.x = element_text(angle = 45, hjust = 1))\n<\/pre><\/div>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"960\" data-attachment-id=\"2669\" data-permalink=\"https:\/\/geekosas.com\/index.php\/es\/2019\/02\/20\/gender-pay-gap-en-tecnologia\/salary-gap-11-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-11-1.png?fit=1344%2C960&amp;ssl=1\" data-orig-size=\"1344,960\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"salary-gap-11-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-11-1.png?fit=1024%2C731&amp;ssl=1\" src=\"https:\/\/i2.wp.com\/www.geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-11-1.png?fit=810%2C578\" alt=\"\" class=\"wp-image-2669\" srcset=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-11-1.png?w=1344&amp;ssl=1 1344w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-11-1.png?resize=300%2C214&amp;ssl=1 300w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-11-1.png?resize=768%2C549&amp;ssl=1 768w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-11-1.png?resize=1024%2C731&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n<p class=\"wp-block-paragraph\">The first interesting thing is that men are older on average than women, a little more than 1.5 years older:<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: r; title: ; notranslate\" title=\"\">\naux = dataset %&gt;%\n  group_by(Male) %&gt;%\n  summarise(YearsCoding = mean(YearsCoding,na.rm=T),\n            YearsCodingProf = mean(YearsCodingProf,na.rm=T),\n            Age = mean(Age,na.rm=T),\n            number = n()) %&gt;%\n  filter(!is.na(Male))\nggplot(aux,aes(Male,Age)) + geom_bar(stat = &#039;identity&#039;,fill=&#039;dark orange&#039;) + ggtitle(&#039;Edad por Genero&#039;)\n<\/pre><\/div>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"960\" data-attachment-id=\"2670\" data-permalink=\"https:\/\/geekosas.com\/index.php\/es\/2019\/02\/20\/gender-pay-gap-en-tecnologia\/salary-gap-12-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-12-1.png?fit=1344%2C960&amp;ssl=1\" data-orig-size=\"1344,960\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"salary-gap-12-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-12-1.png?fit=1024%2C731&amp;ssl=1\" src=\"https:\/\/i1.wp.com\/www.geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-12-1.png?fit=810%2C578\" alt=\"\" class=\"wp-image-2670\" srcset=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-12-1.png?w=1344&amp;ssl=1 1344w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-12-1.png?resize=300%2C214&amp;ssl=1 300w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-12-1.png?resize=768%2C549&amp;ssl=1 768w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-12-1.png?resize=1024%2C731&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n<p class=\"wp-block-paragraph\">Just like in years programming professionally, men have more years programming (professionally or non-professionally).<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nggplot(aux,aes(Male,YearsCoding)) + geom_bar(stat = &#039;identity&#039;,fill=&#039;dark orange&#039;) + ggtitle(&#039;A\u00f1os Programando por Genero&#039;)\n\n<\/pre><\/div>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"960\" data-attachment-id=\"2672\" data-permalink=\"https:\/\/geekosas.com\/index.php\/es\/2019\/02\/20\/gender-pay-gap-en-tecnologia\/salary-gap-13-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-13-1.png?fit=1344%2C960&amp;ssl=1\" data-orig-size=\"1344,960\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"salary-gap-13-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-13-1.png?fit=1024%2C731&amp;ssl=1\" src=\"https:\/\/i2.wp.com\/www.geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-13-1.png?fit=810%2C578\" alt=\"\" class=\"wp-image-2672\" srcset=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-13-1.png?w=1344&amp;ssl=1 1344w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-13-1.png?resize=300%2C214&amp;ssl=1 300w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-13-1.png?resize=768%2C549&amp;ssl=1 768w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-13-1.png?resize=1024%2C731&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n<p class=\"wp-block-paragraph\">Seeing the above, I wondered if the difference in years programming is due to the difference in age, so I plotted how many more years men have than women in the three temporal dimensions. We can see that this explains part, but not all. In particular, after adjusting for age, men have 2 more years programming and 1.5 more years of professional experience.<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: r; title: ; notranslate\" title=\"\">\naux = aux %&gt;%\n  select(-number,-Male) %&gt;%\n  summarize_all(diff) %&gt;%\n  gather(Variable,Difference)\nggplot(aux,aes(Variable,Difference)) + geom_bar(stat=&#039;identity&#039;,fill=&#039;dark orange&#039;) +ggtitle(&#039;Diferencia entre a\u00f1os Hombre y Mujer&#039;)\n<\/pre><\/div>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"960\" data-attachment-id=\"2673\" data-permalink=\"https:\/\/geekosas.com\/index.php\/es\/2019\/02\/20\/gender-pay-gap-en-tecnologia\/salary-gap-14-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-14-1.png?fit=1344%2C960&amp;ssl=1\" data-orig-size=\"1344,960\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"salary-gap-14-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-14-1.png?fit=1024%2C731&amp;ssl=1\" src=\"https:\/\/i1.wp.com\/www.geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-14-1.png?fit=810%2C578\" alt=\"\" class=\"wp-image-2673\" srcset=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-14-1.png?w=1344&amp;ssl=1 1344w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-14-1.png?resize=300%2C214&amp;ssl=1 300w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-14-1.png?resize=768%2C549&amp;ssl=1 768w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-14-1.png?resize=1024%2C731&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n<p class=\"wp-block-paragraph\">If we look at years of experience vs. age, there is a gap that starts at 20, stabilizes at 30, and grows much more at 40.<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: r; title: ; notranslate\" title=\"\">\naux = dataset %&gt;%\n  filter(!is.na(Male) &amp; !is.na(Age) &amp; Age &gt; 20  &amp; Age &lt; 60) %&gt;%\n  group_by(Male,Age) %&gt;%\n  summarize(YearsCoding = mean(YearsCoding,na.rm = T))\nggplot(aux,aes(Age,YearsCoding,group = Male, color = Male)) + geom_line(size=2) + ggtitle(&#039;A\u00f1os de experiencia laboral vs Edad&#039;)\n<\/pre><\/div>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"960\" data-attachment-id=\"2690\" data-permalink=\"https:\/\/geekosas.com\/index.php\/es\/2019\/02\/20\/gender-pay-gap-en-tecnologia\/unnamed-chunk-15-1-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/unnamed-chunk-15-1-1.png?fit=1344%2C960&amp;ssl=1\" data-orig-size=\"1344,960\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"unnamed-chunk-15-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/unnamed-chunk-15-1-1.png?fit=1024%2C731&amp;ssl=1\" src=\"https:\/\/i2.wp.com\/www.geekosas.com\/wp-content\/uploads\/2019\/02\/unnamed-chunk-15-1-1.png?fit=810%2C578\" alt=\"\" class=\"wp-image-2690\" srcset=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/unnamed-chunk-15-1-1.png?w=1344&amp;ssl=1 1344w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/unnamed-chunk-15-1-1.png?resize=300%2C214&amp;ssl=1 300w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/unnamed-chunk-15-1-1.png?resize=768%2C549&amp;ssl=1 768w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/unnamed-chunk-15-1-1.png?resize=1024%2C731&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n<p class=\"wp-block-paragraph\">Finally, if we look at Salary vs. Years of experience by gender, we see that at the beginning women have marginally better salaries than men, but then it comparatively declines. (I removed points with less than 15 samples because at the end there was something weird in women&#8217;s salary, it dropped a lot).<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: r; title: ; notranslate\" title=\"\">\naux = dataset %&gt;%\n  filter(!is.na(Male) &amp; !is.na(YearsCoding)) %&gt;%\n  group_by(Male,YearsCoding) %&gt;%\n  summarize(ConvertedSalary = mean(ConvertedSalary,na.rm = T),\n            q = n()) %&gt;%\n  filter(q &gt;15)\nggplot(aux,aes(YearsCoding,ConvertedSalary,group = Male, color = Male)) + geom_line(size=2) + ggtitle(&#039;Sueldo vs A\u00f1os de experiencia Laboral&#039;)\n<\/pre><\/div>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"960\" data-attachment-id=\"2691\" data-permalink=\"https:\/\/geekosas.com\/index.php\/es\/2019\/02\/20\/gender-pay-gap-en-tecnologia\/unnamed-chunk-17-1-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/unnamed-chunk-17-1-1.png?fit=1344%2C960&amp;ssl=1\" data-orig-size=\"1344,960\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"unnamed-chunk-17-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/unnamed-chunk-17-1-1.png?fit=1024%2C731&amp;ssl=1\" src=\"https:\/\/i1.wp.com\/www.geekosas.com\/wp-content\/uploads\/2019\/02\/unnamed-chunk-17-1-1.png?fit=810%2C578\" alt=\"\" class=\"wp-image-2691\" srcset=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/unnamed-chunk-17-1-1.png?w=1344&amp;ssl=1 1344w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/unnamed-chunk-17-1-1.png?resize=300%2C214&amp;ssl=1 300w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/unnamed-chunk-17-1-1.png?resize=768%2C549&amp;ssl=1 768w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/unnamed-chunk-17-1-1.png?resize=1024%2C731&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n<p class=\"wp-block-paragraph\">The other variable that turned out to be relevant is having the position of Engineering Manager. These receive a higher income than the sample average:<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: r; title: ; notranslate\" title=\"\">\naux = dataset %&gt;%\n  mutate(DevType_Engineering.manager = DevType_Engineering.manager==1) %&gt;%\n  group_by(DevType_Engineering.manager) %&gt;%\n  summarise(ConvertedSalary = mean(ConvertedSalary,na.rm = T))\nggplot(aux,aes(DevType_Engineering.manager,ConvertedSalary)) + geom_bar(stat=&#039;identity&#039;,fill=&#039;dark orange&#039;) +ggtitle(&#039;Sueldo Promedio Engineering Manager vs Resto&#039;)\n<\/pre><\/div>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"960\" data-attachment-id=\"2674\" data-permalink=\"https:\/\/geekosas.com\/index.php\/es\/2019\/02\/20\/gender-pay-gap-en-tecnologia\/salary-gap-15-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-15-1.png?fit=1344%2C960&amp;ssl=1\" data-orig-size=\"1344,960\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"salary-gap-15-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-15-1.png?fit=1024%2C731&amp;ssl=1\" src=\"https:\/\/i2.wp.com\/www.geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-15-1.png?fit=810%2C578\" alt=\"\" class=\"wp-image-2674\" srcset=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-15-1.png?w=1344&amp;ssl=1 1344w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-15-1.png?resize=300%2C214&amp;ssl=1 300w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-15-1.png?resize=768%2C549&amp;ssl=1 768w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-15-1.png?resize=1024%2C731&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n<p class=\"wp-block-paragraph\">On the other hand, it is a position where the proportion of men who hold it relative to the total number of men is double the proportion of women in the position:<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: r; title: ; notranslate\" title=\"\">\naux = dataset %&gt;%\n  group_by(Male,DevType_Engineering.manager) %&gt;%\n  summarise(number = n()) %&gt;%\n  group_by(Male) %&gt;%\n  mutate(portion = number\/sum(number)) %&gt;%\n  filter(!is.na(Male) &amp; DevType_Engineering.manager)\nggplot(aux,aes(Male,portion)) + geom_bar(stat=&#039;identity&#039;,fill=&#039;dark orange&#039;) +ggtitle(&#039;Porcion de Engineering Manager por Genero&#039;)\n<\/pre><\/div>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"960\" data-attachment-id=\"2675\" data-permalink=\"https:\/\/geekosas.com\/index.php\/es\/2019\/02\/20\/gender-pay-gap-en-tecnologia\/salary-gap-16-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-16-1.png?fit=1344%2C960&amp;ssl=1\" data-orig-size=\"1344,960\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"salary-gap-16-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-16-1.png?fit=1024%2C731&amp;ssl=1\" src=\"https:\/\/i2.wp.com\/www.geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-16-1.png?fit=810%2C578\" alt=\"\" class=\"wp-image-2675\" srcset=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-16-1.png?w=1344&amp;ssl=1 1344w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-16-1.png?resize=300%2C214&amp;ssl=1 300w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-16-1.png?resize=768%2C549&amp;ssl=1 768w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-16-1.png?resize=1024%2C731&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s see what attributes are needed to achieve this position, mainly to see if gender is a predictor attribute.<\/p>\n\n\n<p class=\"wp-block-paragraph\">For this analysis, the variables ConvertedSalary, DevType_Product.manager, DevType_Csuite.executive.CEO.CTO.etc, and HopeFiveYears were removed because they appeared in the tree but were not attributes related to experience or gender.<\/p>\n\n\n<p class=\"wp-block-paragraph\">We see again that having more than 5 years of experience is the most important variable, followed by having worked with AWS.<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: r; title: ; notranslate\" title=\"\">\nfitTree = rpart(DevType_Engineering.manager ~ .,select(dataset,\n                                                       -ConvertedSalary,\n                                                       -DevType_Product.manager,\n                                                       -DevType_Csuite.executive.CEO.CTO.etc,\n                                                       -HopeFiveYears), cp = 0.008)\nfancyRpartPlot(fitTree) \n<\/pre><\/div>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"960\" data-attachment-id=\"2677\" data-permalink=\"https:\/\/geekosas.com\/index.php\/es\/2019\/02\/20\/gender-pay-gap-en-tecnologia\/salary-gap-17-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-17-1.png?fit=1344%2C960&amp;ssl=1\" data-orig-size=\"1344,960\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"salary-gap-17-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-17-1.png?fit=1024%2C731&amp;ssl=1\" src=\"https:\/\/i2.wp.com\/www.geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-17-1.png?fit=810%2C578\" alt=\"\" class=\"wp-image-2677\" srcset=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-17-1.png?w=1344&amp;ssl=1 1344w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-17-1.png?resize=300%2C214&amp;ssl=1 300w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-17-1.png?resize=768%2C549&amp;ssl=1 768w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-17-1.png?resize=1024%2C731&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n<p class=\"wp-block-paragraph\">Looking at who has worked with AWS, we see that men have more experience than women on this platform:<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: r; title: ; notranslate\" title=\"\">\naux = dataset %&gt;%\n  group_by(Male) %&gt;%\n  summarise(PlatformWorkedWith_AWS = mean(PlatformWorkedWith_AWS,na.rm=T),\n            number = n()) %&gt;%\n  filter(!is.na(Male))\nggplot(aux,aes(Male,PlatformWorkedWith_AWS)) + geom_bar(stat = &#039;identity&#039;,fill=&#039;dark orange&#039;) + ggtitle(&#039;Trabajo con AWS por Genero&#039;)\n<\/pre><\/div>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"960\" data-attachment-id=\"2678\" data-permalink=\"https:\/\/geekosas.com\/index.php\/es\/2019\/02\/20\/gender-pay-gap-en-tecnologia\/salary-gap-18-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-18-1.png?fit=1344%2C960&amp;ssl=1\" data-orig-size=\"1344,960\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"salary-gap-18-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-18-1.png?fit=1024%2C731&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-18-1.png?fit=810%2C578\" alt=\"\" class=\"wp-image-2678\" srcset=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-18-1.png?w=1344&amp;ssl=1 1344w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-18-1.png?resize=300%2C214&amp;ssl=1 300w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-18-1.png?resize=768%2C549&amp;ssl=1 768w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-18-1.png?resize=1024%2C731&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n<p class=\"has-large-font-size wp-block-paragraph\">Simulation<\/p>\n\n\n<p class=\"wp-block-paragraph\">Finally, using RandomForest we predict the salary of the entire sample and then we change the gender of all people and predict again. There is a decrease of approximately 100 dollars per year when converting a man to a woman and also the reciprocal effect of the same magnitude when doing the opposite:<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: r; title: ; notranslate\" title=\"\">\naux = dataset %&gt;%\n  filter(!is.na(Male)) %&gt;%\n  group_by(Male) %&gt;%\n  summarize(estimado = mean(as.numeric(estimado)),\n            sexo_opuesto = mean(as.numeric(sexo_opuesto))\n  )\ntidy_aux = aux %&gt;% gather(escenario,sueldo_promedio,-Male)\nggplot(tidy_aux,aes(Male,sueldo_promedio,fill= escenario)) + geom_bar(stat=&#039;identity&#039;, position=&#039;dodge&#039;) +ggtitle(&#039;Sueldo estimado vs Sueldo Estimado con genero Opuesto&#039;)\n<\/pre><\/div>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"960\" data-attachment-id=\"2679\" data-permalink=\"https:\/\/geekosas.com\/index.php\/es\/2019\/02\/20\/gender-pay-gap-en-tecnologia\/salary-gap-23-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-23-1.png?fit=1344%2C960&amp;ssl=1\" data-orig-size=\"1344,960\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"salary-gap-23-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-23-1.png?fit=1024%2C731&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-23-1.png?fit=810%2C578\" alt=\"\" class=\"wp-image-2679\" srcset=\"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-23-1.png?w=1344&amp;ssl=1 1344w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-23-1.png?resize=300%2C214&amp;ssl=1 300w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-23-1.png?resize=768%2C549&amp;ssl=1 768w, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/salary-gap-23-1.png?resize=1024%2C731&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n<p class=\"wp-block-paragraph\">The detail of the graph:<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n## # A tibble: 2 x 3\n##   Male  estimado sexo_opuesto\n##   &amp;lt;lgl&gt;    &amp;lt;dbl&gt;        &amp;lt;dbl&gt;\n## 1 FALSE   96298.       96351.\n## 2 TRUE   105451.      105325.\n<\/pre><\/div>\n\n<p class=\"has-large-font-size wp-block-paragraph\">Conclusions<\/p>\n\n\n<p class=\"wp-block-paragraph\">In all the variables that explain salary, men on average make more profitable decisions than women, such as having used AWS, using Windows, participating in company shares, or starting to program earlier, possibly as a hobby. But the most important of all is the number of years of work experience, which in the case of women, for the same age, they have less experience. On the other hand, if we look at salary vs. years of experience, men and women start on an equal footing, but over time men increase their salary more from 10 years of experience onward.<\/p>\n\n\n<p class=\"wp-block-paragraph\">Using the data collected, I lean towards the position that the lower salary is due to the decisions women make from 10 years of experience onward, a point which corresponds to when on average they are 40 years old and surely already have a family and want to be with them. Although it&#8217;s an assumption since that family data is not in the dataset, something certainly happens around the age of 40.<\/p>\n\n\n<p class=\"wp-block-paragraph\">I would like to see how you conclude in the comments. I will be reading them. I would like a healthy discussion to arise among the readers. If you want to see the data, it&#8217;s on my S3 <a href=\"https:\/\/s3.console.aws.amazon.com\/s3\/buckets\/danielfm123-public\/proyects\/salary-gap\/?region=us-east-2&amp;tab=overview\">https:\/\/s3.console.aws.amazon.com\/s3\/buckets\/danielfm123-public\/proyects\/salary-gap\/<\/a> or at the original source <a href=\"https:\/\/insights.stackoverflow.com\/survey\">https:\/\/insights.stackoverflow.com\/survey<\/a><br>As always, the codes on github: <a href=\"https:\/\/github.com\/danielfm123\/salary-gap\">https:\/\/github.com\/danielfm123\/salary-gap<\/a><\/p>\n\n\n<p class=\"wp-block-paragraph\">If you liked the article, you can follow me on <a href=\"http:\/\/facebook.com\/geekosas\">facebook.com\/geekosas<\/a> or sign up to receive emails when I publish new articles.<\/p>\n\n\n<p class=\"wp-block-paragraph\">I also wanted to thank <a href=\"https:\/\/www.linkedin.com\/in\/christian-villarroel\/\">Christian Villarroel<\/a> for participating in the writing of this sensitive article.<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>The Gender Pay Gap is the difference that exists on average in the salaries of Men vs. Women. Today there are people who attribute this <a class=\"mh-excerpt-more\" href=\"https:\/\/geekosas.com\/index.php\/2019\/05\/23\/gender-pay-gap-in-technology\/\" title=\"Gender Pay Gap in Technology\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":2693,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-3339","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sin-categoria"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/02\/GenderPayGap-201803070107196681-20180404082357920.jpg?fit=619%2C413&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8vjqF-RR","jetpack-related-posts":[{"id":3347,"url":"https:\/\/geekosas.com\/index.php\/2019\/05\/23\/uncovering-averages\/","url_meta":{"origin":3339,"position":0},"title":"Uncovering averages","author":"Daniel Fischer","date":"2019-05-23","format":false,"excerpt":"As they say, averages hide many things. In the article gender-pay-gap-en-tecnologia we saw an analysis that showed how, for that data, the salary difference between men and women can be explained by factors other than gender. Now we are going to look at a technique, based on machine learning, that\u2026","rel":"","context":"In &quot;Sin categor\u00eda&quot;","block_context":{"text":"Sin categor\u00eda","link":"https:\/\/geekosas.com\/index.php\/category\/sin-categoria\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/08\/distribution.png?fit=1200%2C767&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/08\/distribution.png?fit=1200%2C767&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/08\/distribution.png?fit=1200%2C767&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/08\/distribution.png?fit=1200%2C767&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2019\/08\/distribution.png?fit=1200%2C767&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3321,"url":"https:\/\/geekosas.com\/index.php\/2018\/05\/23\/separate-effects-and-cohort-analysis\/","url_meta":{"origin":3339,"position":1},"title":"Separate Effects and Cohort Analysis","author":"Daniel Fischer","date":"2018-05-23","format":false,"excerpt":"In subscription businesses (Newspapers, Cell Phones, Insurance, etc...), the business is always the same: acquire a customer and then receive cash flows associated with a service provided by the company. The day the customer cancels the service is called CHURN, and the customer becomes inactive, suspending both revenue and service.\u2026","rel":"","context":"In &quot;Sin categor\u00eda&quot;","block_context":{"text":"Sin categor\u00eda","link":"https:\/\/geekosas.com\/index.php\/category\/sin-categoria\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.geekosas.com\/wp-content\/uploads\/2018\/06\/pressent-value.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.geekosas.com\/wp-content\/uploads\/2018\/06\/pressent-value.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.geekosas.com\/wp-content\/uploads\/2018\/06\/pressent-value.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.geekosas.com\/wp-content\/uploads\/2018\/06\/pressent-value.png?resize=700%2C400 2x"},"classes":[]},{"id":3291,"url":"https:\/\/geekosas.com\/index.php\/2017\/05\/23\/movies-2016\/","url_meta":{"origin":3339,"position":2},"title":"Movies 2016","author":"Daniel Fischer","date":"2017-05-23","format":false,"excerpt":"Movies make us laugh, cry, and some... sleep, so I decided to do a small analysis on 2016 movies. As with Video Games and Data Science, we did web scraping from www.metacritic.com to generate a database, in which, for each movie we obtained the following information: Country of Origin Genres\u2026","rel":"","context":"In &quot;Sin categor\u00eda&quot;","block_context":{"text":"Sin categor\u00eda","link":"https:\/\/geekosas.com\/index.php\/category\/sin-categoria\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.geekosas.com\/wp-content\/uploads\/2017\/03\/histogramas-300x120.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.geekosas.com\/wp-content\/uploads\/2017\/03\/histogramas-300x120.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.geekosas.com\/wp-content\/uploads\/2017\/03\/histogramas-300x120.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.geekosas.com\/wp-content\/uploads\/2017\/03\/histogramas-300x120.png?resize=700%2C400 2x"},"classes":[]},{"id":3288,"url":"https:\/\/geekosas.com\/index.php\/2017\/05\/23\/parking-law\/","url_meta":{"origin":3339,"position":3},"title":"Parking Law","author":"Daniel Fischer","date":"2017-05-23","format":false,"excerpt":"In Chile, on February 15 (correct me if I'm wrong), the parking law was enacted, which among other things requires parking companies to: Compensate customers who are victims of theft. Prohibit fines for lost tickets. Choose one of the following two pricing methods: Charge per minute actually used. Charge per\u2026","rel":"","context":"In &quot;Sin categor\u00eda&quot;","block_context":{"text":"Sin categor\u00eda","link":"https:\/\/geekosas.com\/index.php\/category\/sin-categoria\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2017\/02\/1487175020-auno760729.jpg?fit=799%2C533&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2017\/02\/1487175020-auno760729.jpg?fit=799%2C533&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2017\/02\/1487175020-auno760729.jpg?fit=799%2C533&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2017\/02\/1487175020-auno760729.jpg?fit=799%2C533&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3223,"url":"https:\/\/geekosas.com\/index.php\/2020\/05\/14\/insert-records-into-the-database-at-full-speed\/","url_meta":{"origin":3339,"position":4},"title":"Insert Records into the Database at Full Speed","author":"Daniel Fischer","date":"2020-05-14","format":false,"excerpt":"ETL tools are very useful for performing automated and recurring data transformation processes; they are characterized by performing three tasks: (E) Extract: Connect to one or more sources and extract data. (T) Transform: Transform or manipulate the data. (L) Load: Load the transformed data into the final repository. That is\u2026","rel":"","context":"In &quot;Sin categor\u00eda&quot;","block_context":{"text":"Sin categor\u00eda","link":"https:\/\/geekosas.com\/index.php\/category\/sin-categoria\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2021\/09\/patch.png?fit=728%2C380&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2021\/09\/patch.png?fit=728%2C380&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2021\/09\/patch.png?fit=728%2C380&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2021\/09\/patch.png?fit=728%2C380&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3311,"url":"https:\/\/geekosas.com\/index.php\/2017\/05\/23\/step-forward-attribute-selection-in-r\/","url_meta":{"origin":3339,"position":5},"title":"Step Forward Attribute Selection in R","author":"Daniel Fischer","date":"2017-05-23","format":false,"excerpt":"I made a video in English that explains how to program a step forward attribute selection for linear regressions in R. https:\/\/www.youtube.com\/watch?v=P5ufV7ZqTUk&feature=youtu.be \u00a0","rel":"","context":"In &quot;Sin categor\u00eda&quot;","block_context":{"text":"Sin categor\u00eda","link":"https:\/\/geekosas.com\/index.php\/category\/sin-categoria\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/geekosas.com\/wp-content\/uploads\/2017\/11\/400px-Linear_regression.svg_.png?fit=400%2C265&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/geekosas.com\/index.php\/wp-json\/wp\/v2\/posts\/3339","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geekosas.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geekosas.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geekosas.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/geekosas.com\/index.php\/wp-json\/wp\/v2\/comments?post=3339"}],"version-history":[{"count":1,"href":"https:\/\/geekosas.com\/index.php\/wp-json\/wp\/v2\/posts\/3339\/revisions"}],"predecessor-version":[{"id":3340,"href":"https:\/\/geekosas.com\/index.php\/wp-json\/wp\/v2\/posts\/3339\/revisions\/3340"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/geekosas.com\/index.php\/wp-json\/wp\/v2\/media\/2693"}],"wp:attachment":[{"href":"https:\/\/geekosas.com\/index.php\/wp-json\/wp\/v2\/media?parent=3339"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geekosas.com\/index.php\/wp-json\/wp\/v2\/categories?post=3339"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geekosas.com\/index.php\/wp-json\/wp\/v2\/tags?post=3339"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}