# A tibble: 10 × 3
Country n rate
<fct> <int> <dbl>
1 Mexico 20 0.3
2 Brazil 111 0.234
3 Guatemala 43 0.233
4 El Salvador 45 0.2
5 Colombia 65 0.169
6 Ecuador 43 0.163
7 Honduras 42 0.119
8 Dominican Republic 86 0.0930
9 Haiti 432 0.0370
10 Venezuela 38 0
Pearson's Chi-squared test
data: table(df_detention_model$Country, df_detention_model$detention)
X-squared = 69.32, df = 9, p-value = 2.07e-11
Call:
glm(formula = detention ~ Country, family = binomial, data = df_detention_model)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.2581 0.2548 -12.789 < 2e-16 ***
CountryBrazil 2.0735 0.3393 6.111 9.90e-10 ***
CountryDominican Republic 0.9808 0.4502 2.178 0.029375 *
CountryColombia 1.6670 0.4175 3.993 6.54e-05 ***
CountryEl Salvador 1.8718 0.4514 4.146 3.38e-05 ***
CountryEcuador 1.6205 0.4853 3.339 0.000841 ***
CountryGuatemala 2.0642 0.4418 4.672 2.98e-06 ***
CountryHonduras 1.2566 0.5403 2.326 0.020032 *
CountryVenezuela -14.3080 641.7772 -0.022 0.982213
CountryMexico 2.4108 0.5505 4.380 1.19e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 625.22 on 924 degrees of freedom
Residual deviance: 555.03 on 915 degrees of freedom
AIC: 575.03
Number of Fisher Scoring iterations: 16
# A tibble: 10 × 3
Country n rate
<fct> <int> <dbl>
1 Ecuador 43 0.419
2 Honduras 42 0.286
3 Colombia 65 0.215
4 Brazil 111 0.198
5 Dominican Republic 86 0.198
6 Haiti 432 0.176
7 Guatemala 43 0.163
8 Venezuela 38 0.158
9 El Salvador 45 0.0889
10 Mexico 20 0.05
Pearson's Chi-squared test
data: table(df_court_model$Country, df_court_model$court_hearing)
X-squared = 23.868, df = 9, p-value = 0.004514
Call:
glm(formula = court_hearing ~ Country, family = binomial, data = df_court_model)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.54420 0.12636 -12.221 < 2e-16 ***
CountryBrazil 0.14660 0.26955 0.544 0.586523
CountryDominican Republic 0.14330 0.29880 0.480 0.631516
CountryColombia 0.25143 0.32711 0.769 0.442113
CountryEl Salvador -0.78308 0.53885 -1.453 0.146155
CountryEcuador 1.21569 0.33395 3.640 0.000272 ***
CountryGuatemala -0.09341 0.43197 -0.216 0.828798
CountryHonduras 0.62791 0.36419 1.724 0.084686 .
CountryVenezuela -0.12978 0.46248 -0.281 0.779003
CountryMexico -1.40024 1.03368 -1.355 0.175538
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 903.13 on 924 degrees of freedom
Residual deviance: 880.69 on 915 degrees of freedom
AIC: 900.69
Number of Fisher Scoring iterations: 5