LINKFELICIDAD="https://en.wikipedia.org/wiki/World_Happiness_Report"
library(htmltab)
## Warning: package 'htmltab' was built under R version 4.0.2
felicidad=htmltab(doc = LINKFELICIDAD, 
               which ='//*[@id="mw-content-text"]/div[1]/table')
names(felicidad)=c("Puesto", "Pais", "Puntuacion", "PBI", "Asistencia", "ExpectVida", "Decisiones", "Generosidad", "PercepciónCorrup")
felicidad=felicidad[,-1]
felicidad[,c(2:8)]=lapply(felicidad[,c(2:8)],as.numeric)
str(felicidad)
## 'data.frame':    153 obs. of  8 variables:
##  $ Pais            : chr  " Finland" " Denmark" "  Switzerland" " Iceland" ...
##  $ Puntuacion      : num  7.81 7.65 7.56 7.5 7.49 ...
##  $ PBI             : num  1.28 1.33 1.39 1.33 1.42 ...
##  $ Asistencia      : num  1.5 1.5 1.47 1.55 1.5 ...
##  $ ExpectVida      : num  0.961 0.979 1.041 1.001 1.008 ...
##  $ Decisiones      : num  0.662 0.665 0.629 0.662 0.67 0.614 0.65 0.647 0.603 0.61 ...
##  $ Generosidad     : num  0.16 0.243 0.269 0.362 0.288 0.336 0.273 0.326 0.256 0.196 ...
##  $ PercepciónCorrup: num  0.478 0.495 0.408 0.145 0.434 0.369 0.442 0.461 0.281 0.367 ...
LINKDEMOCRACIA="https://en.wikipedia.org/wiki/Democracy_Index"
library(htmltab)
democracia=htmltab(doc=LINKDEMOCRACIA,which='//*[@id="mw-content-text"]/div[1]/table[2]')
democracia=democracia[,-1]
democracia=democracia[,-10]
names(democracia)=c("Pais", "Democracia", "PE", "FG", "Participación", "Cultura", "Libertad", "Regimen", "Region")
democracia[,c(2:6)]=lapply(democracia[,c(2:6)],as.numeric)
democracia$Regimen=as.ordered(democracia$Regimen)
democracia$Region=as.factor(democracia$Region)
str(democracia)
## 'data.frame':    167 obs. of  9 variables:
##  $ Pais         : chr  " Norway" " Iceland" " Sweden" " New Zealand" ...
##  $ Democracia   : num  9.87 9.58 9.39 9.26 9.25 9.24 9.22 9.22 9.09 9.03 ...
##  $ PE           : num  10 10 9.58 10 10 10 10 9.58 10 9.58 ...
##  $ FG           : num  9.64 9.29 9.64 9.29 8.93 7.86 9.29 9.64 8.93 9.29 ...
##  $ Participación: num  10 8.89 8.33 8.89 8.89 8.33 8.33 7.78 7.78 7.78 ...
##  $ Cultura      : num  10 10 10 8.13 8.75 10 9.38 9.38 8.75 9.38 ...
##  $ Libertad     : chr  "9.71" "9.71" "9.41" "10.00" ...
##  $ Regimen      : Ord.factor w/ 4 levels "Authoritarian"<..: 3 3 3 3 3 3 3 3 3 3 ...
##  $ Region       : Factor w/ 7 levels "Asia & Australasia",..: 7 7 7 1 7 7 7 5 1 7 ...
LINKLIBERTAD="https://en.wikipedia.org/wiki/List_of_freedom_indices"
library(htmltab)
libertad=htmltab(doc=LINKLIBERTAD,which='//*[@id="mw-content-text"]/div[1]/table[2]')
libertad=libertad[,-5]
names(libertad)=c("Pais", "Libertad", "Economía", "LP")
libertad
##                                    Pais    Libertad        Economía
## 2                          Afghanistan    not free   mostly unfree
## 3                              Albania partly free moderately free
## 4                              Algeria    not free       repressed
## 5                              Andorra        free             n/a
## 6                               Angola    not free   mostly unfree
## 7                  Antigua and Barbuda        free             n/a
## 8                            Argentina        free   mostly unfree
## 9                              Armenia partly free     mostly free
## 10                           Australia        free            free
## 11                             Austria        free     mostly free
## 12                          Azerbaijan    not free moderately free
## 13                             Bahamas        free moderately free
## 14                             Bahrain    not free moderately free
## 15                          Bangladesh partly free   mostly unfree
## 16                            Barbados        free moderately free
## 17                             Belarus    not free moderately free
## 18                             Belgium        free moderately free
## 19                              Belize        free   mostly unfree
## 20                               Benin partly free   mostly unfree
## 21                              Bhutan partly free moderately free
## 22                             Bolivia partly free       repressed
## 23              Bosnia and Herzegovina partly free moderately free
## 24                            Botswana        free moderately free
## 25                              Brazil        free   mostly unfree
## 26                              Brunei    not free moderately free
## 27                            Bulgaria        free     mostly free
## 28                        Burkina Faso partly free   mostly unfree
## 29                               Burma    not free   mostly unfree
## 30                             Burundi    not free       repressed
## 31                            Cambodia    not free   mostly unfree
## 32                            Cameroon    not free   mostly unfree
## 33                              Canada        free     mostly free
## 34                          Cape Verde        free moderately free
## 35            Central African Republic    not free   mostly unfree
## 36                                Chad    not free   mostly unfree
## 37                               Chile        free     mostly free
## 38                               China    not free   mostly unfree
## 39                            Colombia partly free moderately free
## 40                             Comoros partly free   mostly unfree
## 41                          Costa Rica        free moderately free
## 42   Congo, Democratic Republic of the    not free       repressed
## 43              Congo, Republic of the    not free       repressed
## 44                             Croatia        free moderately free
## 45                                Cuba    not free       repressed
## 46                              Cyprus        free     mostly free
## 47                      Czech Republic        free     mostly free
## 48                             Denmark        free     mostly free
## 49                            Djibouti    not free   mostly unfree
## 50                            Dominica        free moderately free
## 51                  Dominican Republic partly free moderately free
## 52                          East Timor        free       repressed
## 53                             Ecuador partly free   mostly unfree
## 54                               Egypt    not free   mostly unfree
## 55                         El Salvador partly free moderately free
## 56                   Equatorial Guinea    not free       repressed
## 57                             Eritrea    not free       repressed
## 58                             Estonia        free     mostly free
## 59                            Eswatini    not free   mostly unfree
## 60                            Ethiopia    not free   mostly unfree
## 61                                Fiji partly free moderately free
## 62                             Finland        free     mostly free
## 63                              France        free moderately free
## 64                               Gabon    not free   mostly unfree
## 65                              Gambia partly free   mostly unfree
## 66                             Georgia partly free     mostly free
## 67                             Germany        free     mostly free
## 68                               Ghana        free   mostly unfree
## 69                              Greece        free   mostly unfree
## 70                             Grenada        free             n/a
## 71                           Guatemala partly free moderately free
## 72                              Guinea partly free   mostly unfree
## 73                       Guinea-Bissau partly free   mostly unfree
## 74                              Guyana        free   mostly unfree
## 75                               Haiti partly free   mostly unfree
## 76                            Honduras partly free moderately free
## 77                           Hong Kong partly free            free
## 78                             Hungary partly free moderately free
## 79                             Iceland        free     mostly free
## 80                               India        free   mostly unfree
## 81                           Indonesia partly free moderately free
## 82                                Iran    not free       repressed
## 83                                Iraq    not free             n/a
## 84                             Ireland        free            free
## 85                              Israel        free     mostly free
## 86                               Italy        free moderately free
## 87                         Ivory Coast partly free   mostly unfree
## 88                             Jamaica        free moderately free
## 89                               Japan        free     mostly free
## 90                              Jordan partly free moderately free
## 91                          Kazakhstan    not free moderately free
## 92                               Kenya partly free   mostly unfree
## 93                            Kiribati        free       repressed
## 94                        Korea, North    not free       repressed
## 95                        Korea, South        free     mostly free
## 96                              Kosovo partly free moderately free
## 97                              Kuwait partly free moderately free
## 98                          Kyrgyzstan partly free moderately free
## 99                                Laos    not free   mostly unfree
## 100                             Latvia        free     mostly free
## 101                            Lebanon partly free   mostly unfree
## 102                            Lesotho partly free   mostly unfree
## 103                            Liberia partly free       repressed
## 104                              Libya    not free             n/a
## 105                      Liechtenstein        free             n/a
## 106                          Lithuania        free     mostly free
## 107                         Luxembourg        free     mostly free
## 108                              Macau         n/a     mostly free
## 109                         Madagascar partly free moderately free
## 110                             Malawi partly free   mostly unfree
## 111                           Malaysia partly free     mostly free
## 112                           Maldives partly free   mostly unfree
## 113                               Mali partly free   mostly unfree
## 114                              Malta        free moderately free
## 115                   Marshall Islands        free             n/a
## 116                         Mauritania partly free   mostly unfree
## 117                          Mauritius        free     mostly free
## 118                             Mexico partly free moderately free
## 119    Micronesia, Federated States of        free   mostly unfree
## 120                            Moldova partly free moderately free
## 121                             Monaco        free             n/a
## 122                           Mongolia        free   mostly unfree
## 123                         Montenegro partly free moderately free
## 124                            Morocco partly free moderately free
## 125                         Mozambique partly free   mostly unfree
## 126                            Namibia        free moderately free
## 127                              Nauru        free             n/a
## 128                            Nepal partly free   mostly unfree
## 129                        Netherlands        free     mostly free
## 130                        New Zealand        free            free
## 131                          Nicaragua    not free   mostly unfree
## 132                              Niger partly free   mostly unfree
## 133                            Nigeria partly free   mostly unfree
## 134                    North Macedonia partly free moderately free
## 135                             Norway        free     mostly free
## 136                               Oman    not free moderately free
## 137                           Pakistan partly free   mostly unfree
## 138                              Palau        free             n/a
## 139                          Palestine    not free             n/a
## 140                             Panama        free moderately free
## 141                   Papua New Guinea partly free   mostly unfree
## 142                           Paraguay partly free moderately free
## 143                               Peru        free moderately free
## 144                        Philippines partly free moderately free
## 145                             Poland        free moderately free
## 146                           Portugal        free moderately free
## 147                              Qatar    not free     mostly free
## 148                            Romania        free moderately free
## 149                             Russia    not free moderately free
## 150                             Rwanda    not free     mostly free
## 151              Saint Kitts and Nevis        free             n/a
## 152                        Saint Lucia        free moderately free
## 153   Saint Vincent and the Grenadines        free moderately free
## 154                              Samoa        free moderately free
## 155                         San Marino        free             n/a
## 156           São Tomé and Príncipe        free   mostly unfree
## 157                       Saudi Arabia    not free moderately free
## 158                            Senegal partly free   mostly unfree
## 159                             Serbia partly free moderately free
## 160                         Seychelles partly free moderately free
## 161                       Sierra Leone partly free       repressed
## 162                          Singapore partly free            free
## 163                           Slovakia        free moderately free
## 164                           Slovenia        free moderately free
## 165                    Solomon Islands        free   mostly unfree
## 166                            Somalia    not free             n/a
## 167                       South Africa        free   mostly unfree
## 168                        South Sudan    not free             n/a
## 169                              Spain        free moderately free
## 170                          Sri Lanka partly free   mostly unfree
## 171                              Sudan    not free       repressed
## 172                           Suriname        free       repressed
## 173                             Sweden        free     mostly free
## 174                       Switzerland        free            free
## 175                              Syria    not free             n/a
## 176                             Taiwan        free     mostly free
## 177                         Tajikistan    not free   mostly unfree
## 178                           Tanzania partly free moderately free
## 179                           Thailand partly free moderately free
## 180                               Togo partly free   mostly unfree
## 181                              Tonga        free   mostly unfree
## 182                Trinidad and Tobago        free   mostly unfree
## 183                            Tunisia        free   mostly unfree
## 184                             Turkey    not free moderately free
## 185                       Turkmenistan    not free       repressed
## 186                             Tuvalu        free             n/a
## 187                             Uganda    not free   mostly unfree
## 188                            Ukraine partly free   mostly unfree
## 189               United Arab Emirates    not free     mostly free
## 190                     United Kingdom        free     mostly free
## 191                      United States        free     mostly free
## 192                            Uruguay        free moderately free
## 193                         Uzbekistan    not free   mostly unfree
## 194                            Vanuatu        free moderately free
## 195                          Venezuela    not free       repressed
## 196                            Vietnam    not free   mostly unfree
## 197                              Yemen    not free             n/a
## 198                             Zambia partly free   mostly unfree
## 199                           Zimbabwe partly free       repressed
##                         LP
## 2      difficult situation
## 3      noticeable problems
## 4      difficult situation
## 5   satisfactory situation
## 6      noticeable problems
## 7   satisfactory situation
## 8      noticeable problems
## 9      noticeable problems
## 10  satisfactory situation
## 11  satisfactory situation
## 12  very serious situation
## 13                     n/a
## 14  very serious situation
## 15     difficult situation
## 16                     n/a
## 17     difficult situation
## 18          good situation
## 19     noticeable problems
## 20     difficult situation
## 21     noticeable problems
## 22     difficult situation
## 23     noticeable problems
## 24  satisfactory situation
## 25     noticeable problems
## 26     difficult situation
## 27     difficult situation
## 28  satisfactory situation
## 29     difficult situation
## 30  very serious situation
## 31     difficult situation
## 32     difficult situation
## 33  satisfactory situation
## 34  satisfactory situation
## 35     difficult situation
## 36     difficult situation
## 37     noticeable problems
## 38  very serious situation
## 39     difficult situation
## 40     noticeable problems
## 41          good situation
## 42     difficult situation
## 43     difficult situation
## 44     noticeable problems
## 45  very serious situation
## 46  satisfactory situation
## 47  satisfactory situation
## 48          good situation
## 49  very serious situation
## 50  satisfactory situation
## 51     noticeable problems
## 52     noticeable problems
## 53     noticeable problems
## 54  very serious situation
## 55     noticeable problems
## 56  very serious situation
## 57  very serious situation
## 58          good situation
## 59     difficult situation
## 60     noticeable problems
## 61     noticeable problems
## 62          good situation
## 63  satisfactory situation
## 64     difficult situation
## 65     noticeable problems
## 66     noticeable problems
## 67          good situation
## 68  satisfactory situation
## 69     noticeable problems
## 70  satisfactory situation
## 71     difficult situation
## 72     noticeable problems
## 73     noticeable problems
## 74     noticeable problems
## 75     noticeable problems
## 76     difficult situation
## 77     noticeable problems
## 78     noticeable problems
## 79  satisfactory situation
## 80     difficult situation
## 81     difficult situation
## 82  very serious situation
## 83  very serious situation
## 84          good situation
## 85     noticeable problems
## 86  satisfactory situation
## 87     noticeable problems
## 88          good situation
## 89     noticeable problems
## 90     difficult situation
## 91     difficult situation
## 92     noticeable problems
## 93                     n/a
## 94  very serious situation
## 95  satisfactory situation
## 96     noticeable problems
## 97     noticeable problems
## 98     noticeable problems
## 99  very serious situation
## 100 satisfactory situation
## 101    noticeable problems
## 102    noticeable problems
## 103    noticeable problems
## 104 very serious situation
## 105 satisfactory situation
## 106 satisfactory situation
## 107 satisfactory situation
## 108                    n/a
## 109    noticeable problems
## 110    noticeable problems
## 111    noticeable problems
## 112    noticeable problems
## 113    noticeable problems
## 114    noticeable problems
## 115                    n/a
## 116    noticeable problems
## 117    noticeable problems
## 118    difficult situation
## 119                    n/a
## 120    noticeable problems
## 121                    n/a
## 122    noticeable problems
## 123    noticeable problems
## 124    difficult situation
## 125    noticeable problems
## 126 satisfactory situation
## 127                    n/a
## 128    difficult situation
## 129         good situation
## 130         good situation
## 131    difficult situation
## 132    noticeable problems
## 133    difficult situation
## 134    noticeable problems
## 135         good situation
## 136    difficult situation
## 137    difficult situation
## 138                    n/a
## 139    difficult situation
## 140    noticeable problems
## 141 satisfactory situation
## 142    noticeable problems
## 143    noticeable problems
## 144    difficult situation
## 145    noticeable problems
## 146         good situation
## 147    difficult situation
## 148    noticeable problems
## 149    difficult situation
## 150    difficult situation
## 151 satisfactory situation
## 152 satisfactory situation
## 153 satisfactory situation
## 154 satisfactory situation
## 155                    n/a
## 156                    n/a
## 157 very serious situation
## 158 satisfactory situation
## 159    noticeable problems
## 160    noticeable problems
## 161    noticeable problems
## 162 very serious situation
## 163 satisfactory situation
## 164 satisfactory situation
## 165                    n/a
## 166 very serious situation
## 167 satisfactory situation
## 168    difficult situation
## 169 satisfactory situation
## 170    difficult situation
## 171 very serious situation
## 172 satisfactory situation
## 173         good situation
## 174         good situation
## 175 very serious situation
## 176 satisfactory situation
## 177 very serious situation
## 178    difficult situation
## 179    difficult situation
## 180    noticeable problems
## 181    noticeable problems
## 182 satisfactory situation
## 183    noticeable problems
## 184    difficult situation
## 185 very serious situation
## 186                    n/a
## 187    difficult situation
## 188    noticeable problems
## 189    difficult situation
## 190 satisfactory situation
## 191 satisfactory situation
## 192 satisfactory situation
## 193    difficult situation
## 194                    n/a
## 195    difficult situation
## 196 very serious situation
## 197 very serious situation
## 198    difficult situation
## 199    difficult situation
libertadfelicidad= merge(libertad,felicidad, by = 'Pais',all=F)
data= merge(libertadfelicidad,democracia, by = 'Pais',all=F)
data
##                           Pais  Libertad.x        Economía
## 1                     Nepal partly free   mostly unfree
## 2                Switzerland        free            free
## 3                 Afghanistan    not free   mostly unfree
## 4                     Albania partly free moderately free
## 5                     Algeria    not free       repressed
## 6                   Argentina        free   mostly unfree
## 7                     Armenia partly free     mostly free
## 8                   Australia        free            free
## 9                     Austria        free     mostly free
## 10                 Azerbaijan    not free moderately free
## 11                    Bahrain    not free moderately free
## 12                 Bangladesh partly free   mostly unfree
## 13                    Belarus    not free moderately free
## 14                    Belgium        free moderately free
## 15                      Benin partly free   mostly unfree
## 16                    Bolivia partly free       repressed
## 17     Bosnia and Herzegovina partly free moderately free
## 18                   Botswana        free moderately free
## 19                     Brazil        free   mostly unfree
## 20                   Bulgaria        free     mostly free
## 21               Burkina Faso partly free   mostly unfree
## 22                    Burundi    not free       repressed
## 23                   Cambodia    not free   mostly unfree
## 24                   Cameroon    not free   mostly unfree
## 25                     Canada        free     mostly free
## 26   Central African Republic    not free   mostly unfree
## 27                       Chad    not free   mostly unfree
## 28                      Chile        free     mostly free
## 29                      China    not free   mostly unfree
## 30                   Colombia partly free moderately free
## 31                    Comoros partly free   mostly unfree
## 32                 Costa Rica        free moderately free
## 33                    Croatia        free moderately free
## 34                     Cyprus        free     mostly free
## 35             Czech Republic        free     mostly free
## 36                    Denmark        free     mostly free
## 37         Dominican Republic partly free moderately free
## 38                    Ecuador partly free   mostly unfree
## 39                      Egypt    not free   mostly unfree
## 40                El Salvador partly free moderately free
## 41                    Estonia        free     mostly free
## 42                   Ethiopia    not free   mostly unfree
## 43                    Finland        free     mostly free
## 44                     France        free moderately free
## 45                      Gabon    not free   mostly unfree
## 46                     Gambia partly free   mostly unfree
## 47                    Georgia partly free     mostly free
## 48                    Germany        free     mostly free
## 49                      Ghana        free   mostly unfree
## 50                     Greece        free   mostly unfree
## 51                  Guatemala partly free moderately free
## 52                     Guinea partly free   mostly unfree
## 53                      Haiti partly free   mostly unfree
## 54                   Honduras partly free moderately free
## 55                  Hong Kong partly free            free
## 56                    Hungary partly free moderately free
## 57                    Iceland        free     mostly free
## 58                      India        free   mostly unfree
## 59                  Indonesia partly free moderately free
## 60                       Iran    not free       repressed
## 61                       Iraq    not free             n/a
## 62                    Ireland        free            free
## 63                     Israel        free     mostly free
## 64                      Italy        free moderately free
## 65                Ivory Coast partly free   mostly unfree
## 66                    Jamaica        free moderately free
## 67                      Japan        free     mostly free
## 68                     Jordan partly free moderately free
## 69                 Kazakhstan    not free moderately free
## 70                      Kenya partly free   mostly unfree
## 71                     Kuwait partly free moderately free
## 72                 Kyrgyzstan partly free moderately free
## 73                       Laos    not free   mostly unfree
## 74                     Latvia        free     mostly free
## 75                    Lebanon partly free   mostly unfree
## 76                    Lesotho partly free   mostly unfree
## 77                    Liberia partly free       repressed
## 78                      Libya    not free             n/a
## 79                  Lithuania        free     mostly free
## 80                 Luxembourg        free     mostly free
## 81                 Madagascar partly free moderately free
## 82                     Malawi partly free   mostly unfree
## 83                   Malaysia partly free     mostly free
## 84                       Mali partly free   mostly unfree
## 85                      Malta        free moderately free
## 86                 Mauritania partly free   mostly unfree
## 87                  Mauritius        free     mostly free
## 88                     Mexico partly free moderately free
## 89                    Moldova partly free moderately free
## 90                   Mongolia        free   mostly unfree
## 91                 Montenegro partly free moderately free
## 92                    Morocco partly free moderately free
## 93                 Mozambique partly free   mostly unfree
## 94                    Namibia        free moderately free
## 95                Netherlands        free     mostly free
## 96                New Zealand        free            free
## 97                  Nicaragua    not free   mostly unfree
## 98                      Niger partly free   mostly unfree
## 99                    Nigeria partly free   mostly unfree
## 100                    Norway        free     mostly free
## 101                  Pakistan partly free   mostly unfree
## 102                 Palestine    not free             n/a
## 103                    Panama        free moderately free
## 104                  Paraguay partly free moderately free
## 105                      Peru        free moderately free
## 106               Philippines partly free moderately free
## 107                    Poland        free moderately free
## 108                  Portugal        free moderately free
## 109                   Romania        free moderately free
## 110                    Russia    not free moderately free
## 111                    Rwanda    not free     mostly free
## 112              Saudi Arabia    not free moderately free
## 113                   Senegal partly free   mostly unfree
## 114                    Serbia partly free moderately free
## 115              Sierra Leone partly free       repressed
## 116                 Singapore partly free            free
## 117                  Slovakia        free moderately free
## 118                  Slovenia        free moderately free
## 119              South Africa        free   mostly unfree
## 120                     Spain        free moderately free
## 121                 Sri Lanka partly free   mostly unfree
## 122                    Sweden        free     mostly free
## 123                    Taiwan        free     mostly free
## 124                Tajikistan    not free   mostly unfree
## 125                  Tanzania partly free moderately free
## 126                  Thailand partly free moderately free
## 127                      Togo partly free   mostly unfree
## 128       Trinidad and Tobago        free   mostly unfree
## 129                   Tunisia        free   mostly unfree
## 130                    Turkey    not free moderately free
## 131              Turkmenistan    not free       repressed
## 132                    Uganda    not free   mostly unfree
## 133                   Ukraine partly free   mostly unfree
## 134      United Arab Emirates    not free     mostly free
## 135            United Kingdom        free     mostly free
## 136             United States        free     mostly free
## 137                   Uruguay        free moderately free
## 138                Uzbekistan    not free   mostly unfree
## 139                 Venezuela    not free       repressed
## 140                   Vietnam    not free   mostly unfree
## 141                     Yemen    not free             n/a
## 142                    Zambia partly free   mostly unfree
## 143                  Zimbabwe partly free       repressed
##                         LP Puntuacion   PBI Asistencia ExpectVida Decisiones
## 1      difficult situation      5.137 0.444      1.101      0.669      0.481
## 2           good situation      7.560 1.391      1.472      1.041      0.629
## 3      difficult situation      2.567 0.301      0.356      0.266      0.000
## 4      noticeable problems      4.883 0.907      0.830      0.846      0.462
## 5      difficult situation      5.005 0.944      1.143      0.745      0.084
## 6      noticeable problems      5.975 1.028      1.373      0.850      0.521
## 7      noticeable problems      4.677 0.808      1.035      0.776      0.378
## 8   satisfactory situation      7.223 1.310      1.477      1.023      0.622
## 9   satisfactory situation      7.294 1.317      1.437      1.001      0.603
## 10  very serious situation      5.165 0.990      1.181      0.731      0.468
## 11  very serious situation      6.227 1.297      1.315      0.839      0.610
## 12     difficult situation      4.833 0.556      0.869      0.695      0.604
## 13     difficult situation      5.540 1.019      1.387      0.753      0.291
## 14          good situation      6.864 1.296      1.399      0.965      0.500
## 15     difficult situation      5.216 0.366      0.352      0.328      0.406
## 16     difficult situation      5.747 0.731      1.142      0.662      0.574
## 17     noticeable problems      5.674 0.918      1.204      0.814      0.305
## 18  satisfactory situation      3.479 0.998      1.086      0.494      0.509
## 19     noticeable problems      6.376 0.953      1.363      0.766      0.483
## 20     difficult situation      5.102 1.047      1.461      0.778      0.418
## 21  satisfactory situation      4.769 0.302      0.929      0.313      0.322
## 22  very serious situation      3.775 0.000      0.404      0.295      0.275
## 23     difficult situation      4.848 0.545      1.071      0.588      0.675
## 24     difficult situation      5.085 0.504      0.900      0.270      0.439
## 25  satisfactory situation      7.232 1.302      1.435      1.023      0.644
## 26     difficult situation      3.476 0.041      0.000      0.000      0.293
## 27     difficult situation      4.423 0.302      0.739      0.109      0.229
## 28     noticeable problems      6.228 1.097      1.323      0.889      0.417
## 29  very serious situation      5.124 0.991      1.132      0.867      0.602
## 30     difficult situation      6.163 0.932      1.334      0.810      0.527
## 31     noticeable problems      4.289 0.416      0.723      0.437      0.181
## 32          good situation      7.121 0.981      1.375      0.940      0.645
## 33     noticeable problems      5.505 1.109      1.311      0.901      0.381
## 34  satisfactory situation      6.159 1.213      1.149      1.026      0.459
## 35  satisfactory situation      6.911 1.212      1.405      0.895      0.506
## 36          good situation      7.646 1.327      1.503      0.979      0.665
## 37     noticeable problems      5.689 0.983      1.329      0.742      0.563
## 38     noticeable problems      5.925 0.853      1.221      0.839      0.555
## 39  very serious situation      4.151 0.875      0.983      0.597      0.374
## 40     noticeable problems      6.348 0.749      1.149      0.753      0.524
## 41          good situation      6.022 1.192      1.453      0.843      0.577
## 42     noticeable problems      4.186 0.315      1.001      0.484      0.413
## 43          good situation      7.809 1.285      1.500      0.961      0.662
## 44  satisfactory situation      6.664 1.268      1.459      1.030      0.514
## 45     difficult situation      4.829 0.988      1.106      0.523      0.369
## 46     noticeable problems      4.751 0.257      0.883      0.353      0.403
## 47     noticeable problems      4.673 0.847      0.731      0.695      0.485
## 48          good situation      7.076 1.314      1.369      0.972      0.564
## 49  satisfactory situation      5.148 0.576      0.966      0.432      0.477
## 50     noticeable problems      5.515 1.128      1.169      0.979      0.174
## 51     difficult situation      6.399 0.754      1.174      0.706      0.613
## 52     noticeable problems      4.949 0.390      0.751      0.334      0.372
## 53     noticeable problems      3.721 0.285      0.647      0.374      0.169
## 54     difficult situation      5.953 0.599      1.187      0.792      0.568
## 55     noticeable problems      5.510 1.377      1.244      1.137      0.459
## 56     noticeable problems      6.000 1.164      1.423      0.807      0.386
## 57  satisfactory situation      7.504 1.327      1.548      1.001      0.662
## 58     difficult situation      3.573 0.731      0.644      0.541      0.581
## 59     difficult situation      5.286 0.892      1.155      0.610      0.568
## 60  very serious situation      4.672 1.029      0.886      0.749      0.301
## 61  very serious situation      4.785 0.982      1.011      0.529      0.284
## 62          good situation      7.094 1.447      1.471      0.976      0.588
## 63     noticeable problems      7.129 1.216      1.403      1.008      0.421
## 64  satisfactory situation      6.387 1.236      1.347      1.023      0.321
## 65     noticeable problems      5.233 0.537      0.800      0.155      0.397
## 66          good situation      5.890 0.779      1.408      0.788      0.553
## 67     noticeable problems      5.871 1.267      1.332      1.073      0.495
## 68     difficult situation      4.633 0.785      1.140      0.778      0.425
## 69     difficult situation      6.058 1.123      1.453      0.699      0.497
## 70     noticeable problems      4.583 0.476      0.905      0.536      0.519
## 71     noticeable problems      6.102 1.425      1.245      0.776      0.570
## 72     noticeable problems      5.542 0.513      1.341      0.681      0.615
## 73  very serious situation      4.889 0.715      0.987      0.486      0.612
## 74  satisfactory situation      5.950 1.141      1.414      0.778      0.329
## 75     noticeable problems      4.772 0.889      1.192      0.789      0.186
## 76     noticeable problems      3.653 0.455      1.089      0.101      0.409
## 77     noticeable problems      4.558 0.174      0.921      0.392      0.406
## 78  very serious situation      5.489 1.022      1.196      0.616      0.451
## 79  satisfactory situation      6.215 1.194      1.433      0.795      0.420
## 80  satisfactory situation      7.238 1.537      1.388      0.986      0.610
## 81     noticeable problems      4.166 0.245      0.824      0.501      0.193
## 82     noticeable problems      3.538 0.177      0.530      0.446      0.487
## 83     noticeable problems      5.384 1.168      1.174      0.789      0.597
## 84     noticeable problems      4.729 0.352      0.973      0.235      0.378
## 85     noticeable problems      6.773 1.253      1.443      0.972      0.633
## 86     noticeable problems      4.375 0.540      1.113      0.425      0.186
## 87     noticeable problems      6.101 1.074      1.396      0.763      0.591
## 88     difficult situation      6.465 1.024      1.226      0.832      0.554
## 89     noticeable problems      5.608 0.708      1.237      0.713      0.390
## 90     noticeable problems      5.456 0.905      1.459      0.616      0.356
## 91     noticeable problems      5.546 1.010      1.266      0.839      0.303
## 92     difficult situation      5.095 0.759      0.645      0.745      0.450
## 93     noticeable problems      4.624 0.179      0.955      0.324      0.561
## 94  satisfactory situation      4.571 0.840      1.246      0.407      0.445
## 95          good situation      7.449 1.339      1.464      0.976      0.614
## 96          good situation      7.300 1.242      1.487      1.008      0.647
## 97     difficult situation      6.137 0.620      1.271      0.803      0.560
## 98     noticeable problems      4.910 0.108      0.704      0.299      0.435
## 99     difficult situation      4.724 0.646      0.987      0.168      0.435
## 100         good situation      7.488 1.424      1.495      1.008      0.670
## 101    difficult situation      5.693 0.617      0.873      0.470      0.405
## 102    difficult situation      4.553 0.588      1.195      0.614      0.299
## 103    noticeable problems      6.305 1.098      1.376      0.879      0.580
## 104    noticeable problems      5.692 0.898      1.368      0.736      0.587
## 105    noticeable problems      5.797 0.919      1.208      0.824      0.513
## 106    difficult situation      6.006 0.775      1.245      0.602      0.622
## 107    noticeable problems      6.186 1.169      1.310      0.868      0.558
## 108         good situation      5.911 1.169      1.340      0.979      0.590
## 109    noticeable problems      6.124 1.120      1.194      0.792      0.535
## 110    difficult situation      5.546 1.127      1.379      0.680      0.399
## 111    difficult situation      3.312 0.343      0.523      0.572      0.604
## 112 very serious situation      6.406 1.334      1.310      0.760      0.548
## 113 satisfactory situation      4.981 0.504      0.955      0.518      0.352
## 114    noticeable problems      5.778 0.988      1.327      0.828      0.395
## 115    noticeable problems      3.926 0.241      0.748      0.204      0.382
## 116 very serious situation      6.377 1.520      1.395      1.138      0.635
## 117 satisfactory situation      6.281 1.195      1.424      0.853      0.424
## 118 satisfactory situation      6.363 1.209      1.465      0.933      0.647
## 119 satisfactory situation      4.814 0.902      1.259      0.407      0.435
## 120 satisfactory situation      6.401 1.231      1.421      1.051      0.426
## 121    difficult situation      4.327 0.898      1.195      0.792      0.529
## 122         good situation      7.353 1.322      1.433      0.986      0.650
## 123 satisfactory situation      6.455 1.327      1.358      0.878      0.449
## 124 very serious situation      5.556 0.475      1.218      0.681      0.521
## 125    difficult situation      3.476 0.457      0.873      0.443      0.509
## 126    difficult situation      5.999 1.007      1.348      0.794      0.609
## 127    noticeable problems      4.187 0.268      0.548      0.343      0.304
## 128 satisfactory situation      6.192 1.168      1.407      0.659      0.553
## 129    noticeable problems      4.392 0.875      0.872      0.781      0.236
## 130    difficult situation      5.132 1.127      1.197      0.781      0.254
## 131 very serious situation      5.119 1.009      1.510      0.612      0.515
## 132    difficult situation      4.432 0.312      1.052      0.378      0.402
## 133    noticeable problems      4.561 0.780      1.321      0.699      0.319
## 134    difficult situation      6.791 1.431      1.251      0.788      0.653
## 135 satisfactory situation      7.165 1.273      1.458      0.976      0.525
## 136 satisfactory situation      6.940 1.374      1.405      0.832      0.535
## 137 satisfactory situation      6.440 1.071      1.425      0.857      0.594
## 138    difficult situation      6.258 0.697      1.434      0.717      0.693
## 139    difficult situation      5.053 0.770      1.349      0.767      0.272
## 140 very serious situation      5.353 0.718      1.253      0.819      0.651
## 141 very serious situation      3.527 0.393      1.177      0.415      0.244
## 142    difficult situation      3.759 0.537      0.896      0.364      0.491
## 143    difficult situation      3.299 0.426      1.048      0.375      0.377
##     Generosidad PercepciónCorrup Democracia    PE   FG Participación Cultura
## 1         0.301            0.128       5.28  4.83 5.36          5.00    5.63
## 2         0.269            0.408       9.03  9.58 9.29          7.78    9.38
## 3         0.135            0.001       2.85  3.42 0.64          3.89    2.50
## 4         0.171            0.025       5.89  7.00 5.36          4.44    5.00
## 5         0.119            0.129       4.01  3.08 2.86          5.00    5.00
## 6         0.070            0.060       7.02  9.17 5.36          6.11    6.25
## 7         0.107            0.105       5.54  7.50 5.36          6.11    3.13
## 8         0.325            0.336       9.09 10.00 8.93          7.78    8.75
## 9         0.256            0.281       8.29  9.58 7.86          8.33    6.88
## 10        0.040            0.247       2.75  0.50 3.21          2.78    3.75
## 11        0.287            0.127       2.55  0.83 2.71          2.78    4.38
## 12        0.177            0.177       5.88  7.83 6.07          6.11    4.38
## 13        0.090            0.194       2.48  0.92 2.00          2.78    4.38
## 14        0.147            0.209       7.64  9.58 8.21          5.00    6.88
## 15        0.197            0.126       5.09  4.67 5.71          4.44    5.63
## 16        0.138            0.073       4.84  4.75 3.93          5.00    3.75
## 17        0.264            0.001       4.86  6.17 2.93          5.56    3.75
## 18        0.033            0.102       7.81  9.17 7.14          6.11    7.50
## 19        0.132            0.107       6.86  9.58 5.36          6.11    5.00
## 20        0.104            0.000       7.03  9.17 6.43          7.22    4.38
## 21        0.186            0.126       4.04  3.92 2.71          4.44    5.00
## 22        0.187            0.212       2.15  0.00 0.07          3.33    5.00
## 23        0.233            0.073       3.53  0.83 4.64          3.33    5.63
## 24        0.198            0.054       2.85  1.67 2.50          3.33    4.38
## 25        0.282            0.352       9.22  9.58 9.64          7.78    9.38
## 26        0.254            0.028       1.32  1.25 0.00          1.11    1.88
## 27        0.211            0.086       1.61  0.00 0.00          1.67    3.75
## 28        0.156            0.063       8.08  9.58 8.57          5.00    8.13
## 29        0.079            0.117       2.26  0.00 4.29          3.33    2.50
## 30        0.092            0.046       7.13  9.17 6.79          5.56    5.63
## 31        0.259            0.100       3.15  2.08 2.21          3.89    3.75
## 32        0.131            0.096       8.13  9.58 7.50          6.67    7.50
## 33        0.114            0.012       6.57  9.17 6.07          5.56    5.00
## 34        0.228            0.051       7.59  9.17 6.43          6.67    6.88
## 35        0.046            0.050       7.69  9.58 6.79          6.67    6.88
## 36        0.243            0.495       9.22 10.00 9.29          8.33    9.38
## 37        0.112            0.116       6.54  9.17 5.36          6.11    5.00
## 38        0.115            0.087       6.33  8.75 5.36          6.11    4.38
## 39        0.069            0.095       3.06  2.67 3.21          3.33    3.75
## 40        0.119            0.117       6.15  9.17 4.64          6.11    3.75
## 41        0.125            0.202       7.90  9.58 7.86          6.67    6.88
## 42        0.228            0.117       3.44  0.42 3.57          5.56    5.00
## 43        0.160            0.478       9.25 10.00 8.93          8.89    8.75
## 44        0.113            0.227       8.12  9.58 7.86          7.78    6.88
## 45        0.052            0.056       3.61  2.58 2.21          4.44    5.00
## 46        0.426            0.158       4.33  4.00 4.29          3.33    5.63
## 47        0.048            0.174       5.42  7.83 3.21          6.11    4.38
## 48        0.252            0.309       8.68  9.58 8.57          8.33    7.50
## 49        0.261            0.057       6.63  8.33 5.71          6.67    6.25
## 50        0.000            0.049       7.43  9.58 4.86          6.67    7.50
## 51        0.171            0.098       5.26  6.92 4.64          3.89    4.38
## 52        0.249            0.112       3.14  3.50 0.43          4.44    4.38
## 53        0.464            0.162       4.57  4.75 2.07          3.89    6.25
## 54        0.257            0.087       5.42  7.83 4.29          4.44    4.38
## 55        0.288            0.332       6.02  3.58 4.36          6.11    7.50
## 56        0.070            0.028       6.63  8.75 6.07          5.00    6.25
## 57        0.362            0.145       9.58 10.00 9.29          8.89   10.00
## 58        0.237            0.106       6.90  8.67 6.79          6.67    5.63
## 59        0.543            0.038       6.48  7.92 7.14          6.11    5.63
## 60        0.277            0.143       2.38  0.00 2.86          4.44    3.13
## 61        0.153            0.073       3.74  5.25 0.00          6.67    5.00
## 62        0.295            0.373       9.24 10.00 7.86          8.33   10.00
## 63        0.267            0.100       7.86  9.17 7.86          8.89    7.50
## 64        0.170            0.040       7.52  9.58 6.07          7.78    6.25
## 65        0.170            0.093       4.05  4.33 2.86          3.33    5.63
## 66        0.116            0.030       6.96  8.75 7.14          4.44    6.25
## 67        0.036            0.181       7.99  8.75 8.21          6.67    7.50
## 68        0.091            0.152       3.93  3.58 4.29          3.89    4.38
## 69        0.154            0.110       2.94  0.50 2.14          4.44    4.38
## 70        0.394            0.067       5.18  3.50 5.71          6.67    5.63
## 71        0.133            0.113       3.93  3.58 4.29          3.89    4.38
## 72        0.301            0.030       4.89  6.08 2.93          6.67    3.75
## 73        0.273            0.194       2.14  0.00 2.86          1.67    5.00
## 74        0.075            0.090       7.49  9.58 6.07          6.11    6.88
## 75        0.159            0.022       4.36  3.92 1.50          6.67    5.00
## 76        0.103            0.050       6.54  9.17 4.50          6.67    5.63
## 77        0.227            0.051       5.45  7.42 3.07          5.56    5.63
## 78        0.143            0.172       2.02  0.00 0.00          2.78    4.38
## 79        0.054            0.081       7.50  9.58 6.43          6.11    6.25
## 80        0.196            0.367       8.81 10.00 8.93          6.67    8.75
## 81        0.191            0.076       5.64  7.92 3.57          6.11    5.63
## 82        0.213            0.132       5.50  6.08 4.29          5.00    6.25
## 83        0.275            0.062       7.16  9.17 7.86          6.67    6.25
## 84        0.170            0.062       4.92  6.42 3.07          3.89    5.63
## 85        0.341            0.179       7.95  9.17 7.50          6.11    8.13
## 86        0.129            0.122       3.92  3.50 3.57          5.00    3.13
## 87        0.187            0.084       8.22  9.17 8.21          5.56    8.75
## 88        0.083            0.083       6.09  7.83 6.07          7.22    3.13
## 89        0.174            0.014       5.75  6.58 4.64          6.11    4.38
## 90        0.264            0.047       6.50  9.17 5.71          5.56    5.00
## 91        0.149            0.098       5.65  5.67 5.36          6.11    4.38
## 92        0.040            0.077       5.10  5.25 4.64          5.56    5.63
## 93        0.220            0.163       3.65  2.58 2.14          5.00    5.00
## 94        0.076            0.054       6.43  6.58 5.36          6.67    5.63
## 95        0.336            0.369       9.01  9.58 9.29          8.33    8.75
## 96        0.326            0.461       9.26 10.00 9.29          8.89    8.13
## 97        0.213            0.174       3.55  1.25 2.86          3.89    5.63
## 98        0.208            0.138       3.29  2.92 1.14          3.33    4.38
## 99        0.221            0.048       4.12  5.17 3.93          3.33    3.75
## 100       0.288            0.434       9.87 10.00 9.64         10.00   10.00
## 101       0.229            0.123       4.25  6.08 5.71          2.22    2.50
## 102       0.092            0.072       3.89  3.33 0.14          7.78    4.38
## 103       0.097            0.054       7.05  9.58 6.07          6.67    5.00
## 104       0.204            0.065       6.24  8.75 5.71          5.00    4.38
## 105       0.092            0.027       6.60  9.17 5.00          5.56    5.63
## 106       0.129            0.130       6.64  9.17 5.36          7.22    4.38
## 107       0.063            0.161       6.62  9.17 6.07          6.11    4.38
## 108       0.053            0.028       8.03  9.58 7.86          6.11    7.50
## 109       0.068            0.001       6.49  9.17 5.71          5.56    4.38
## 110       0.099            0.046       3.11  2.17 1.79          5.00    2.50
## 111       0.236            0.486       3.16  1.42 4.29          2.78    4.38
## 112       0.087            0.163       1.93  0.00 2.86          2.22    3.13
## 113       0.164            0.082       5.81  6.08 6.07          4.44    6.25
## 114       0.150            0.059       6.41  8.25 5.36          6.11    5.00
## 115       0.258            0.048       4.86  6.58 2.86          3.33    6.25
## 116       0.219            0.533       6.02  3.92 7.86          5.00    6.25
## 117       0.117            0.011       7.17  9.58 7.14          5.56    5.63
## 118       0.146            0.077       7.50  9.58 6.79          6.67    6.25
## 119       0.126            0.060       7.24  7.42 7.50          8.33    5.00
## 120       0.165            0.110       8.29  9.58 7.14          7.78    8.13
## 121       0.253            0.049       6.27  7.00 6.07          5.56    6.25
## 122       0.273            0.442       9.39  9.58 9.64          8.33   10.00
## 123       0.151            0.132       7.73  9.58 8.21          6.11    5.63
## 124       0.182            0.222       1.93  0.08 0.79          1.67    6.25
## 125       0.272            0.204       5.16  5.75 5.00          5.00    5.63
## 126       0.377            0.032       6.32  7.42 5.36          6.11    6.25
## 127       0.201            0.115       3.30  3.17 1.79          3.33    5.00
## 128       0.199            0.015       7.16  9.58 7.14          6.11    5.63
## 129       0.056            0.044       6.72  9.17 5.71          7.22    5.63
## 130       0.086            0.121       4.09  3.08 5.00          5.00    5.00
## 131       0.323            0.034       1.72  0.00 0.79          2.22    5.00
## 132       0.265            0.064       5.02  4.33 3.57          4.44    6.88
## 133       0.179            0.010       5.90  7.42 2.71          6.67    6.25
## 134       0.281            0.220       2.76  0.00 3.93          2.22    5.00
## 135       0.373            0.323       8.52  9.58 7.50          8.89    7.50
## 136       0.298            0.152       7.96  9.17 7.14          7.78    7.50
## 137       0.132            0.193       8.38 10.00 8.57          6.11    7.50
## 138       0.363            0.280       2.01  0.08 1.86          2.22    5.00
## 139       0.087            0.064       2.88  0.00 1.79          5.00    4.38
## 140       0.136            0.090       3.08  0.00 3.21          3.89    5.63
## 141       0.095            0.087       1.95  0.00 0.00          3.89    5.00
## 142       0.251            0.087       5.09  4.75 2.93          4.44    6.88
## 143       0.151            0.081       3.16  0.00 2.50          4.44    5.63
##     Libertad.y          Regimen                     Region
## 1         5.59    Hybrid regime         Asia & Australasia
## 2         9.12   Full democracy             Western Europe
## 3         3.82    Authoritarian         Asia & Australasia
## 4         7.65    Hybrid regime             Eastern Europe
## 5         4.12    Hybrid regime Middle East & North Africa
## 6         8.24 Flawed democracy              Latin America
## 7         5.59    Hybrid regime             Eastern Europe
## 8        10.00   Full democracy         Asia & Australasia
## 9         8.82   Full democracy             Western Europe
## 10        3.53    Authoritarian             Eastern Europe
## 11        2.06    Authoritarian Middle East & North Africa
## 12        5.00    Hybrid regime         Asia & Australasia
## 13        2.35    Authoritarian             Eastern Europe
## 14        8.53 Flawed democracy             Western Europe
## 15        5.00    Hybrid regime         Sub-Saharan Africa
## 16        6.76    Hybrid regime              Latin America
## 17        5.88    Hybrid regime             Eastern Europe
## 18        9.12 Flawed democracy         Sub-Saharan Africa
## 19        8.24 Flawed democracy              Latin America
## 20        7.94 Flawed democracy             Eastern Europe
## 21        4.12    Hybrid regime         Sub-Saharan Africa
## 22        2.35    Authoritarian         Sub-Saharan Africa
## 23        3.24    Authoritarian         Asia & Australasia
## 24        2.35    Authoritarian         Sub-Saharan Africa
## 25        9.71   Full democracy              North America
## 26        2.35    Authoritarian         Sub-Saharan Africa
## 27        2.65    Authoritarian         Sub-Saharan Africa
## 28        9.12   Full democracy              Latin America
## 29        1.18    Authoritarian         Asia & Australasia
## 30        8.53 Flawed democracy              Latin America
## 31        3.82    Authoritarian         Sub-Saharan Africa
## 32        9.41   Full democracy              Latin America
## 33        7.06 Flawed democracy             Eastern Europe
## 34        8.82 Flawed democracy             Western Europe
## 35        8.53 Flawed democracy             Eastern Europe
## 36        9.12   Full democracy             Western Europe
## 37        7.06 Flawed democracy              Latin America
## 38        7.06 Flawed democracy              Latin America
## 39        2.35    Authoritarian Middle East & North Africa
## 40        7.06 Flawed democracy              Latin America
## 41        8.53 Flawed democracy             Eastern Europe
## 42        2.65    Authoritarian         Sub-Saharan Africa
## 43        9.71   Full democracy             Western Europe
## 44        8.53   Full democracy             Western Europe
## 45        3.82    Authoritarian         Sub-Saharan Africa
## 46        4.41    Hybrid regime         Sub-Saharan Africa
## 47        5.59    Hybrid regime             Eastern Europe
## 48        9.41   Full democracy             Western Europe
## 49        6.18 Flawed democracy         Sub-Saharan Africa
## 50        8.53 Flawed democracy             Western Europe
## 51        6.47    Hybrid regime              Latin America
## 52        2.94    Authoritarian         Sub-Saharan Africa
## 53        5.88    Hybrid regime              Latin America
## 54        6.18    Hybrid regime              Latin America
## 55        8.53 Flawed democracy         Asia & Australasia
## 56        7.06 Flawed democracy             Eastern Europe
## 57        9.71   Full democracy             Western Europe
## 58        6.76 Flawed democracy         Asia & Australasia
## 59        5.59 Flawed democracy         Asia & Australasia
## 60        1.47    Authoritarian Middle East & North Africa
## 61        1.76    Authoritarian Middle East & North Africa
## 62       10.00   Full democracy             Western Europe
## 63        5.88 Flawed democracy Middle East & North Africa
## 64        7.94 Flawed democracy             Western Europe
## 65        4.12    Hybrid regime         Sub-Saharan Africa
## 66        8.24 Flawed democracy              Latin America
## 67        8.82 Flawed democracy         Asia & Australasia
## 68        3.53    Authoritarian Middle East & North Africa
## 69        3.24    Authoritarian             Eastern Europe
## 70        4.41    Hybrid regime         Sub-Saharan Africa
## 71        3.53    Authoritarian Middle East & North Africa
## 72        5.00    Hybrid regime             Eastern Europe
## 73        1.18    Authoritarian         Asia & Australasia
## 74        8.82 Flawed democracy             Eastern Europe
## 75        4.71    Hybrid regime Middle East & North Africa
## 76        6.76 Flawed democracy         Sub-Saharan Africa
## 77        5.59    Hybrid regime         Sub-Saharan Africa
## 78        2.94    Authoritarian Middle East & North Africa
## 79        9.12 Flawed democracy             Eastern Europe
## 80        9.71   Full democracy             Western Europe
## 81        5.00    Hybrid regime         Sub-Saharan Africa
## 82        5.88    Hybrid regime         Sub-Saharan Africa
## 83        5.88 Flawed democracy         Asia & Australasia
## 84        5.59    Hybrid regime         Sub-Saharan Africa
## 85        8.82 Flawed democracy             Western Europe
## 86        4.41    Authoritarian         Sub-Saharan Africa
## 87        9.41   Full democracy         Sub-Saharan Africa
## 88        6.18 Flawed democracy              Latin America
## 89        7.06    Hybrid regime             Eastern Europe
## 90        7.06 Flawed democracy         Asia & Australasia
## 91        6.76    Hybrid regime             Eastern Europe
## 92        4.41    Hybrid regime Middle East & North Africa
## 93        3.53    Authoritarian         Sub-Saharan Africa
## 94        7.94 Flawed democracy         Sub-Saharan Africa
## 95        9.12   Full democracy             Western Europe
## 96       10.00   Full democracy         Asia & Australasia
## 97        4.12    Authoritarian              Latin America
## 98        4.71    Authoritarian         Sub-Saharan Africa
## 99        4.41    Hybrid regime         Sub-Saharan Africa
## 100       9.71   Full democracy             Western Europe
## 101       4.71    Hybrid regime         Asia & Australasia
## 102       3.82    Authoritarian Middle East & North Africa
## 103       7.94 Flawed democracy              Latin America
## 104       7.35 Flawed democracy              Latin America
## 105       7.65 Flawed democracy              Latin America
## 106       7.06 Flawed democracy         Asia & Australasia
## 107       7.35 Flawed democracy             Eastern Europe
## 108       9.12   Full democracy             Western Europe
## 109       7.65 Flawed democracy             Eastern Europe
## 110       4.12    Authoritarian             Eastern Europe
## 111       2.94    Authoritarian         Sub-Saharan Africa
## 112       1.47    Authoritarian Middle East & North Africa
## 113       6.18    Hybrid regime         Sub-Saharan Africa
## 114       7.35 Flawed democracy             Eastern Europe
## 115       5.29    Hybrid regime         Sub-Saharan Africa
## 116       7.06 Flawed democracy         Asia & Australasia
## 117       7.94 Flawed democracy             Eastern Europe
## 118       8.24 Flawed democracy             Eastern Europe
## 119       7.94 Flawed democracy         Sub-Saharan Africa
## 120       8.82   Full democracy             Western Europe
## 121       6.47 Flawed democracy         Asia & Australasia
## 122       9.41   Full democracy             Western Europe
## 123       9.12 Flawed democracy         Asia & Australasia
## 124       0.88    Authoritarian             Eastern Europe
## 125       4.41    Hybrid regime         Sub-Saharan Africa
## 126       6.47 Flawed democracy         Asia & Australasia
## 127       3.24    Authoritarian         Sub-Saharan Africa
## 128       7.35 Flawed democracy              Latin America
## 129       5.88 Flawed democracy Middle East & North Africa
## 130       2.35    Hybrid regime             Western Europe
## 131       0.59    Authoritarian             Eastern Europe
## 132       5.88    Hybrid regime         Sub-Saharan Africa
## 133       6.47    Hybrid regime             Eastern Europe
## 134       2.65    Authoritarian Middle East & North Africa
## 135       9.12   Full democracy             Western Europe
## 136       8.24 Flawed democracy              North America
## 137       9.71   Full democracy              Latin America
## 138       0.88    Authoritarian             Eastern Europe
## 139       3.24    Authoritarian              Latin America
## 140       2.65    Authoritarian         Asia & Australasia
## 141       0.88    Authoritarian Middle East & North Africa
## 142       6.47    Hybrid regime         Sub-Saharan Africa
## 143       3.24    Authoritarian         Sub-Saharan Africa
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.0.2
base=ggplot(data=data, aes(x=Asistencia))
base+geom_histogram(bins=20)

base=ggplot(data=data, aes(x=Asistencia))
base+geom_boxplot() + coord_flip()

IQR(data$Asistencia)
## [1] 0.4045
HB=formula(~ PBI + Asistencia)
cor.test(HB,data=data,method = "spearm",exact=F)
## 
##  Spearman's rank correlation rho
## 
## data:  PBI and Asistencia
## S = 105080, p-value < 2.2e-16
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##       rho 
## 0.7843827
library(ggpubr)
## Warning: package 'ggpubr' was built under R version 4.0.3
ggscatter(data, 
          x = "PBI", y = "Asistencia",
          cor.coef = TRUE, 
          cor.method = "spearman",
           add = "reg.line",
          add.params = list(color = "blue", fill = "lightgray"),
          conf.int = TRUE) 
## `geom_smooth()` using formula 'y ~ x'

data=data[complete.cases(data),]
summary(data)
##      Pais            Libertad.x          Economía              LP           
##  Length:143         Length:143         Length:143         Length:143        
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##    Puntuacion         PBI          Asistencia      ExpectVida    
##  Min.   :2.567   Min.   :0.000   Min.   :0.000   Min.   :0.0000  
##  1st Qu.:4.740   1st Qu.:0.566   1st Qu.:0.987   1st Qu.:0.5205  
##  Median :5.542   Median :0.932   Median :1.226   Median :0.7630  
##  Mean   :5.513   Mean   :0.876   Mean   :1.164   Mean   :0.6987  
##  3rd Qu.:6.269   3rd Qu.:1.181   3rd Qu.:1.391   3rd Qu.:0.8620  
##  Max.   :7.809   Max.   :1.537   Max.   :1.548   Max.   :1.1380  
##                                                                  
##    Decisiones      Generosidad     PercepciónCorrup   Democracia   
##  Min.   :0.0000   Min.   :0.0000   Min.   :0.0000   Min.   :1.320  
##  1st Qu.:0.3840   1st Qu.:0.1135   1st Qu.:0.0550   1st Qu.:3.905  
##  Median :0.4870   Median :0.1710   Median :0.0980   Median :5.890  
##  Mean   :0.4682   Mean   :0.1864   Mean   :0.1325   Mean   :5.668  
##  3rd Qu.:0.5805   3rd Qu.:0.2565   3rd Qu.:0.1630   3rd Qu.:7.460  
##  Max.   :0.6930   Max.   :0.5430   Max.   :0.5330   Max.   :9.870  
##                                                                    
##        PE               FG        Participación       Cultura      
##  Min.   : 0.000   Min.   :0.000   Min.   : 1.110   Min.   : 1.880  
##  1st Qu.: 3.460   1st Qu.:2.930   1st Qu.: 4.440   1st Qu.: 4.380  
##  Median : 7.420   Median :5.360   Median : 5.560   Median : 5.630  
##  Mean   : 6.162   Mean   :5.001   Mean   : 5.478   Mean   : 5.676  
##  3rd Qu.: 9.170   3rd Qu.:7.140   3rd Qu.: 6.670   3rd Qu.: 6.565  
##  Max.   :10.000   Max.   :9.640   Max.   :10.000   Max.   :10.000  
##                                                                    
##   Libertad.y                    Regimen                          Region  
##  Length:143         Authoritarian   :39   Asia & Australasia        :21  
##  Class :character   Flawed democracy:48   Eastern Europe            :27  
##  Mode  :character   Full democracy  :22   Latin America             :21  
##                     Hybrid regime   :34   Middle East & North Africa:16  
##                                           North America             : 2  
##                                           Sub-Saharan Africa        :35  
##                                           Western Europe            :21
dataregresión=lm(PBI ~ Asistencia + FG,data=data)
summary(dataregresión)
## 
## Call:
## lm(formula = PBI ~ Asistencia + FG, data = data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.42071 -0.14129  0.00418  0.10903  0.53652 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.273252   0.073729  -3.706 0.000302 ***
## Asistencia   0.786409   0.073403  10.714  < 2e-16 ***
## FG           0.046802   0.008329   5.619 9.99e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.2108 on 140 degrees of freedom
## Multiple R-squared:  0.6847, Adjusted R-squared:  0.6802 
## F-statistic:   152 on 2 and 140 DF,  p-value: < 2.2e-16