An exploration of the relationship between education and corruption in the different states of Mexico. Using several education indices, the paper aims to examine the effects of education on corruption, more specifically aimed at college-level education. Variables that explain overall scholarity, college attendance and absortion rates will be used to try to explain the corruption index for different years.
The Impact of Political Alternation on Corruption in Mexico - El efecto de la alternancia política sobre la corrupción en México, by IRVIN MIKHAIL SOTO ZAZUETA. DINÁMICAS COTIDIANAS DE LA GESTIÓN EDUCATIVA SEGÚN HEIDENHEIMER, EL CASO DE VERACRUZ, MÉXICO by Oswualdo Antonio González and Felipe J. Hevia. Corruption and Education: Empirical Evidence by Mohamed Dridi.
library("mxmaps") # library to work with Mexico's map
library("gt") # used for tables
library("extrafont") # adds fonts
## Registering fonts with R
library("ggplot2")
library("dplyr")
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(car)
## Loading required package: carData
##
## Attaching package: 'car'
## The following object is masked from 'package:dplyr':
##
## recode
state_data <- read.csv("~/Desktop/proyecto/state_data.csv")
states <- subset(state_data, subset = (region != FALSE)) # subset data to eliminate national data
states_nomex <- subset(states, subset =(region != 15))
# Table of all variables in the data set along with their class
varData <- setNames(stack(sapply(states, class))[2:1], c('variable', 'class'))
### missing descriptions
gt::gt(varData)
| variable | class |
|---|---|
| region | integer |
| state | character |
| geolocation | character |
| ICBG_2001 | numeric |
| ICBG_2003 | numeric |
| ICBG_2005 | numeric |
| ICBG_2007 | numeric |
| ICBG_2010 | numeric |
| pop_2005 | integer |
| pop_2010 | integer |
| male_pop_2010 | integer |
| fem_pop_2010 | integer |
| marg_index_2000 | numeric |
| sprim_2005 | numeric |
| sprim_2010 | numeric |
| analf_2010 | numeric |
| marg_index_2010 | numeric |
| state_police_interv_2010 | integer |
| GDP_capita_2003 | integer |
| college_absortion_04 | numeric |
| hs_absortion_04 | numeric |
| hs_schooling_rate_04 | numeric |
| col_schooling_rate_04 | numeric |
| hs_net_schooling_04 | numeric |
| col_net_schooling_04 | numeric |
| hs_desertion_2003 | numeric |
| col_desertion_2003 | numeric |
| real_hs_graduate_03 | numeric |
| illiteracy_03 | numeric |
| illiteracy_04 | numeric |
| GDP_growth_2010 | numeric |
| comp_per_100_functionaries_2010 | integer |
| crime_per_100000_2010 | integer |
| tot_scholarity_rate_10 | numeric |
| male_scholarity_rate_10 | numeric |
| fem_scholarity_rate_10 | numeric |
| tot_scholarity_rate_15 | numeric |
| male_scholarity_rate_15 | numeric |
| fem_scholarity_rate_15 | numeric |
| tot_scholarity_rate_00 | numeric |
| male_scholarity_rate_00 | numeric |
| fem_scholarity_rate_00 | numeric |
| col_enroll_2001 | integer |
| col_enroll_2006 | integer |
| col_enroll_2011 | integer |
| GDP_2005 | numeric |
| GDP_capita_2005 | numeric |
| marg_index_2005 | numeric |
The following section gives background on the data, which will help readers understand the demographic and educational situation in the different states of Mexico. It will help explain some variables independently and form several figures to make the data seem clearer. Five maps of the country of Mexico were made to give demographics on corruption, education, GDP, and marginalization.
# Use mxmaps library to create several maps
df_mxstate_2020$value <- states$pop_2010
mxstate_choropleth(df_mxstate_2020,
title = "Total population, by state (2010)")
## Warning in self$bind(): The following regions were missing and are being set to
## NA: 15
As mentioned earlier, Estado de Mexico (Mexico) is not considered for the experiment because not all data was available. We notice that most of the population is found in the center of the country.
# Mexico map by corruption
df_mxstate_2020$value <- states$ICBG_2010
mxstate_choropleth(df_mxstate_2020,
title = "Corruption index, by state (2010)")
## Warning in self$bind(): The following regions were missing and are being set to
## NA: 15
For this map, we notice that corruption appears more in the center and south states, such as Oaxaca, Guerrero, Ciudad de Mexico, Hidalgo, Jalisco, Tabasco. Will there be lower scholarity scores in southern states?
# Mexico map by GDP per capita
df_mxstate_2020$value <- states$GDP_capita_2003
mxstate_choropleth(df_mxstate_2020,
title = "GDP per capita, by state (2003)")
## Warning in self$bind(): The following regions were missing and are being set to
## NA: 15
We notice a different trend when talking about GDP per capita by state, there is a noticeable amount of GDP found in the northern states in Mexico, the other states that contain a significant amount of GDP are Campeche, Quintana Roo, and Ciudad de Mexico. We see this phenomenon in more countries, and even with the world itself.
# Mexico map my marginalization
df_mxstate_2020$value <- states$marg_index_2010
mxstate_choropleth(df_mxstate_2020,
title = "Marginalization, by state (2003)")
We notice an opposite trend when talking about marginalization in the
different states. Most marginalized states are found in the south of the
country. States like Oaxaca, Guerrero, Chiapas and Veracruz contain high
levels of marginalization. This map looks similarly colored to the map
explaining corruption.
Finally, we can compute Mexico’s map and see the education levels in the
different states.
# Mexico map by High School graduation rates
df_mxstate_2020$value <- states$sprim_2005
mxstate_choropleth(df_mxstate_2020,
title = "People older than 15 with incomplete elementary school")
When talking about students currently in college, we notice high numbers in states like Sonora, Nuevo Leon and Tamaulipas, all found in the north. Ciudad de Mexico also shows a higher than average education level. Again we notice a similar pattern, states in the south suffer from lower scholarity rates.
ICBG_2010_sorted <- arrange(states, desc(ICBG_2010))
head(select(ICBG_2010_sorted, state, ICBG_2010))
Distrito Federal (Ciudad de Mexico) is the highest in the corruption
index, followed by Guerrero and Oaxaca, which we previously noticed were
some of the highest marginalized states. Distrito Federal shows the
highest corruption numbers, while also having the highest GDP.
Is there a relation among GDP, scholarity and corruption?
states_names <- states$state # Convert states column to vector
ICBG_2010 <- states$ICBG_2010 # ICBG column to vector
# Create a bar plot
barplot(ICBG_2010, names.arg = states_names,
xlab = "States", ylab = "Corruption Index",
main = "Corruption per state",
las = 2, cex.names = 0.5)
sprim_2010 <- states$sprim_2010 # sprim column to vector
# Create a bar plot
barplot(sprim_2010, names.arg = states_names,
xlab = "States", ylab = "People older than 15 without complete elementary school",
main = "Elementary School Incompletion",
las = 2, cex.names = 0.5)
We can see that Distrito Federal (Ciudad de Mexico) has the highest
elementary school completion rate, but also the highest corruption rate
among all states, which is contrary to the initial hypothesis. We will
first build a linear regression model using this two variables and see
if we can find something interesting.
lm1 <- lm(ICBG_2010 ~ sprim_2010, states)
summary(lm1)
##
## Call:
## lm(formula = ICBG_2010 ~ sprim_2010, data = states)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.1059 -1.8967 -0.7844 1.9684 10.2667
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.20492 1.95751 3.681 0.000945 ***
## sprim_2010 0.04912 0.09117 0.539 0.594123
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.418 on 29 degrees of freedom
## (1 observation deleted due to missingness)
## Multiple R-squared: 0.009912, Adjusted R-squared: -0.02423
## F-statistic: 0.2903 on 1 and 29 DF, p-value: 0.5941
We can observe a multiple R-squared of around 1% and a p-value of
0.5941, which is high. Overall, the summary of the regression implies
that there is not much of a relation between an individual being older
than 15 with an incomplete elementary school and the corruption index
for that same year.
Now, we can see if there is a relation between scholarity grade and
marginalization:
lm2 <- lm(tot_scholarity_rate_10 ~ marg_index_2010, states)
summary(lm2)
##
## Call:
## lm(formula = tot_scholarity_rate_10 ~ marg_index_2010, data = states)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.82277 -0.10654 0.01601 0.15410 0.79292
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 8.59930 0.06164 139.52 < 2e-16 ***
## marg_index_2010 -0.77552 0.06265 -12.38 2.56e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3487 on 30 degrees of freedom
## Multiple R-squared: 0.8363, Adjusted R-squared: 0.8308
## F-statistic: 153.2 on 1 and 30 DF, p-value: 2.557e-13
We notice a multiple R-squared of 0.8363 and a p-value of 2.557e-13,
extremely low. We therefore identify a relation between a marginalized
state and a low schooling rate. But the question is not about
marginalization.
We can first build two models to test, one that relates scholarity rates
by state to their relative corruption for the same year to see the
overall effect of the poblation. The variable
tot_scholarity_rate_10 explains the number of years in school,
in average, that were approved by people 15 years or older.
# Linear model including scholarity rates and people with incomplete elementary school
lm3 <- lm(ICBG_2010 ~ tot_scholarity_rate_10 + sprim_2010, states)
vif(lm3) # check for confounding
## tot_scholarity_rate_10 sprim_2010
## 16.90991 16.90991
summary(lm3)
##
## Call:
## lm(formula = ICBG_2010 ~ tot_scholarity_rate_10 + sprim_2010,
## data = states)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.430 -1.908 -0.082 1.358 7.909
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -41.0245 32.5121 -1.262 0.217
## tot_scholarity_rate_10 4.3615 2.9350 1.486 0.148
## sprim_2010 0.5786 0.3673 1.575 0.126
##
## Residual standard error: 3.349 on 28 degrees of freedom
## (1 observation deleted due to missingness)
## Multiple R-squared: 0.08229, Adjusted R-squared: 0.01674
## F-statistic: 1.255 on 2 and 28 DF, p-value: 0.3005
A similar result to the first linear regression, and we can also
notice high confounding between variables, sprim_2010 gives a slightly
smaller p-value so it will be used in future models.
Now compare several values from year 2003 to the corruption index from
that same year.
lm4 <- lm(ICBG_2003 ~ illiteracy_03 + col_desertion_2003 + real_hs_graduate_03 + hs_desertion_2003 + col_enroll_2001, states)
summary(lm4)
##
## Call:
## lm(formula = ICBG_2003 ~ illiteracy_03 + col_desertion_2003 +
## real_hs_graduate_03 + hs_desertion_2003 + col_enroll_2001,
## data = states)
##
## Residuals:
## Min 1Q Median 3Q Max
## -5.2092 -1.7367 -0.2128 1.1991 7.9151
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -8.792e-01 1.114e+01 -0.079 0.9377
## illiteracy_03 1.075e-01 1.176e-01 0.915 0.3692
## col_desertion_2003 -1.622e-01 1.450e-01 -1.119 0.2738
## real_hs_graduate_03 1.221e-01 1.007e-01 1.213 0.2364
## hs_desertion_2003 -2.226e-01 2.496e-01 -0.892 0.3811
## col_enroll_2001 2.162e-05 8.316e-06 2.600 0.0154 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.991 on 25 degrees of freedom
## (1 observation deleted due to missingness)
## Multiple R-squared: 0.3591, Adjusted R-squared: 0.2309
## F-statistic: 2.801 on 5 and 25 DF, p-value: 0.0384
We see a multiple R-squared of 0.3591, but we are aiming for a higher
score. Now let’s see if these numbers, together with more variables,
have a higher relation with corruption for next years. We will also
change illiteracy rates from 2003 to the sprim_2005 value. We notice
that college enrollment from year 2001 gives valuable information and
has the lowest p-value.
What would happen if we talked about the corruption values for year
2003, year when most people enrolled in college in 2001 are done with
their studies.
lm5 <- lm(ICBG_2007 ~ + col_desertion_2003 + real_hs_graduate_03 + hs_desertion_2003 + sprim_2005 + college_absortion_04 + col_desertion_2003 + col_enroll_2006, states)
summary(lm5)
##
## Call:
## lm(formula = ICBG_2007 ~ +col_desertion_2003 + real_hs_graduate_03 +
## hs_desertion_2003 + sprim_2005 + college_absortion_04 + col_desertion_2003 +
## col_enroll_2006, data = states)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.6414 -1.1307 0.1983 1.1152 3.2911
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.276e+00 6.854e+00 1.353 0.18857
## col_desertion_2003 5.512e-02 9.538e-02 0.578 0.56875
## real_hs_graduate_03 4.065e-02 6.080e-02 0.669 0.51012
## hs_desertion_2003 -9.009e-02 1.606e-01 -0.561 0.58005
## sprim_2005 -8.044e-02 5.577e-02 -1.442 0.16211
## college_absortion_04 -4.185e-02 2.626e-02 -1.593 0.12415
## col_enroll_2006 1.563e-05 4.998e-06 3.128 0.00457 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.804 on 24 degrees of freedom
## (1 observation deleted due to missingness)
## Multiple R-squared: 0.4313, Adjusted R-squared: 0.2891
## F-statistic: 3.034 on 6 and 24 DF, p-value: 0.02367
lm6 <- lm(ICBG_2010 ~ col_enroll_2006 + college_absortion_04 + sprim_2010, states)
summary(lm6)
##
## Call:
## lm(formula = ICBG_2010 ~ col_enroll_2006 + college_absortion_04 +
## sprim_2010, data = states)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.4838 -1.5720 -0.4289 1.7676 6.6038
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 8.224e+00 4.285e+00 1.919 0.065578 .
## col_enroll_2006 2.919e-05 7.263e-06 4.018 0.000421 ***
## college_absortion_04 -4.177e-02 3.541e-02 -1.179 0.248509
## sprim_2010 6.314e-02 9.123e-02 0.692 0.494751
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.765 on 27 degrees of freedom
## (1 observation deleted due to missingness)
## Multiple R-squared: 0.3969, Adjusted R-squared: 0.3299
## F-statistic: 5.922 on 3 and 27 DF, p-value: 0.003058
# model adding all found variables related to education
lm7 <- lm(ICBG_2005 ~ col_desertion_2003 + real_hs_graduate_03 + hs_desertion_2003 + sprim_2005 + college_absortion_04 + col_desertion_2003 + col_enroll_2001, states)
vif(lm7) # checking for confounding again
## col_desertion_2003 real_hs_graduate_03 hs_desertion_2003
## 1.555979 1.447422 1.552618
## sprim_2005 college_absortion_04 col_enroll_2001
## 1.768474 1.908804 1.201036
summary(lm7)
##
## Call:
## lm(formula = ICBG_2005 ~ col_desertion_2003 + real_hs_graduate_03 +
## hs_desertion_2003 + sprim_2005 + college_absortion_04 + col_desertion_2003 +
## col_enroll_2001, data = states)
##
## Residuals:
## Min 1Q Median 3Q Max
## -5.6909 -1.5261 0.2939 1.5298 6.5227
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -4.709e+00 1.006e+01 -0.468 0.643944
## col_desertion_2003 1.761e-01 1.391e-01 1.266 0.217597
## real_hs_graduate_03 1.366e-01 8.950e-02 1.526 0.139975
## hs_desertion_2003 3.904e-01 2.363e-01 1.652 0.111590
## sprim_2005 -1.090e-01 8.240e-02 -1.322 0.198484
## college_absortion_04 -9.006e-02 3.859e-02 -2.334 0.028309 *
## col_enroll_2001 3.290e-05 7.680e-06 4.284 0.000257 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.65 on 24 degrees of freedom
## (1 observation deleted due to missingness)
## Multiple R-squared: 0.5297, Adjusted R-squared: 0.4121
## F-statistic: 4.505 on 6 and 24 DF, p-value: 0.003427
We see a multiple R-squared of 0.5297, and also we notice that the p-value from variable col_enroll_2001 has a p-value of 0.000257, very low. We can now build the final model, including these education variables together with other variables that might be important for corruption.
lm8 <- lm(ICBG_2005 ~ col_desertion_2003 + real_hs_graduate_03 + hs_desertion_2003 + sprim_2005 + college_absortion_04 + col_desertion_2003 + col_enroll_2001 + GDP_2005, states)
summary(lm8)
##
## Call:
## lm(formula = ICBG_2005 ~ col_desertion_2003 + real_hs_graduate_03 +
## hs_desertion_2003 + sprim_2005 + college_absortion_04 + col_desertion_2003 +
## col_enroll_2001 + GDP_2005, data = states)
##
## Residuals:
## Min 1Q Median 3Q Max
## -5.7537 -1.2457 0.1398 1.3543 6.3079
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -5.420e+00 1.024e+01 -0.529 0.6017
## col_desertion_2003 1.772e-01 1.408e-01 1.259 0.2208
## real_hs_graduate_03 1.461e-01 9.171e-02 1.593 0.1249
## hs_desertion_2003 3.755e-01 2.402e-01 1.563 0.1317
## sprim_2005 -1.052e-01 8.359e-02 -1.259 0.2208
## college_absortion_04 -9.122e-02 3.909e-02 -2.333 0.0287 *
## col_enroll_2001 2.318e-05 1.671e-05 1.387 0.1787
## GDP_2005 1.791e-06 2.726e-06 0.657 0.5178
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.682 on 23 degrees of freedom
## (1 observation deleted due to missingness)
## Multiple R-squared: 0.5383, Adjusted R-squared: 0.3978
## F-statistic: 3.831 on 7 and 23 DF, p-value: 0.006684
vif(lm8)
## col_desertion_2003 real_hs_graduate_03 hs_desertion_2003
## 1.556181 1.483862 1.566448
## sprim_2005 college_absortion_04 col_enroll_2001
## 1.776774 1.912747 5.551556
## GDP_2005
## 5.541648
We notice high confounding among college enrollment in 2001 and GDP in 2005. We can run a linear regression just to see how this relation works.
states$inv_sprim_2005 <- 100 - states$sprim_2005
lm9 <- lm(GDP_2005 ~ col_enroll_2001 + inv_sprim_2005, states)
summary(lm9)
##
## Call:
## lm(formula = GDP_2005 ~ col_enroll_2001 + inv_sprim_2005, data = states)
##
## Residuals:
## Min 1Q Median 3Q Max
## -222930 -80261 -27447 38422 894836
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.829e+05 3.457e+05 -0.818 0.420
## col_enroll_2001 5.362e+00 5.118e-01 10.478 2.27e-11 ***
## inv_sprim_2005 4.682e+03 4.643e+03 1.008 0.322
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 189600 on 29 degrees of freedom
## Multiple R-squared: 0.8215, Adjusted R-squared: 0.8092
## F-statistic: 66.74 on 2 and 29 DF, p-value: 1.406e-11
After applying a difference of 4 years between college enrollment and the corruption index, and adding an index for people older than 15 with elementary education we obtain a high multiple R-squared and a low p-value but only for the college enrollment variable. We will now add geographic location as a variable and see if we can find something.
# Change character classes from data set to dummy variables
states$geolocation[states$geolocation == 'Sur'] <- 1
states$geolocation[states$geolocation == 'Centro'] <- 2
states$geolocation[states$geolocation == 'Centro-norte'] <- 3
states$geolocation[states$geolocation == 'Norte-occidente'] <- 4
states$geolocation[states$geolocation == 'Norte'] <- 5
Numbers go from 1 to 5, 1 being the farthest to the south, and 5 to the north.
lm9 <- lm(ICBG_2005 ~ col_desertion_2003 + real_hs_graduate_03 + hs_desertion_2003 + sprim_2005 + college_absortion_04 + col_desertion_2003 + col_enroll_2001 + geolocation + GDP_capita_2005, states)
summary(lm9)
##
## Call:
## lm(formula = ICBG_2005 ~ col_desertion_2003 + real_hs_graduate_03 +
## hs_desertion_2003 + sprim_2005 + college_absortion_04 + col_desertion_2003 +
## col_enroll_2001 + geolocation + GDP_capita_2005, data = states)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.8578 -1.0645 -0.3377 1.1374 5.4396
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -7.227e+00 9.819e+00 -0.736 0.470738
## col_desertion_2003 1.841e-01 1.606e-01 1.146 0.265964
## real_hs_graduate_03 1.816e-01 9.286e-02 1.956 0.065304 .
## hs_desertion_2003 5.477e-01 2.402e-01 2.280 0.034345 *
## sprim_2005 -2.301e-01 9.702e-02 -2.371 0.028443 *
## college_absortion_04 -8.590e-02 4.519e-02 -1.901 0.072605 .
## col_enroll_2001 3.046e-05 7.808e-06 3.901 0.000961 ***
## geolocation2 -1.429e+00 1.843e+00 -0.775 0.447704
## geolocation3 -7.292e-01 2.083e+00 -0.350 0.730093
## geolocation4 -2.881e+00 1.885e+00 -1.528 0.142996
## geolocation5 -4.284e+00 2.254e+00 -1.901 0.072583 .
## GDP_capita_2005 3.780e-07 2.516e-06 0.150 0.882149
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.555 on 19 degrees of freedom
## (1 observation deleted due to missingness)
## Multiple R-squared: 0.6538, Adjusted R-squared: 0.4533
## F-statistic: 3.261 on 11 and 19 DF, p-value: 0.01158
vif(lm9)
## GVIF Df GVIF^(1/(2*Df))
## col_desertion_2003 2.230405 1 1.493454
## real_hs_graduate_03 1.675460 1 1.294396
## hs_desertion_2003 1.725681 1 1.313652
## sprim_2005 2.636225 1 1.623645
## college_absortion_04 2.815633 1 1.677985
## col_enroll_2001 1.334929 1 1.155391
## geolocation 5.420258 4 1.235243
## GDP_capita_2005 1.469314 1 1.212152
The marginalization index was omitted for this model, since it had great confounding with the sprim_2005 variable, which makes sense based on what we saw regarding education and marginalization.