library(tidyverse)
library(haven)
library(labelled)
library(survey)
library(forcats)
library(openxlsx)
library(Hmisc)
library(ggplot2)
library(kableExtra)
library(dplyr)
library(tidyr)
library(stringr)
library(knitr)
library(cregg)
library(scales)
library(readxl)




data_file_w5 <- "D:/Populism and Democrary/World value survey/WVS 2006/F00007944-WV5_Data_R_v20180912.rds"

stopifnot(file.exists(data_file_w5))

wvs_raw5 <- readRDS(data_file_w5)
wvs5     <- wvs_raw5


dim(wvs5)
## [1] 83975   414

Country statistics and macro regions

country_lookup_w5 <- tibble::tribble(
  ~V2,  ~country,
  20,   "Andorra",
  32,   "Argentina",
  36,   "Australia",
  50,   "Bangladesh",
  76,   "Brazil",
  100,  "Bulgaria",
  124,  "Canada",
  152,  "Chile",
  156,  "China",
  158,  "Taiwan ROC",
  170,  "Colombia",
  191,  "Croatia",
  196,  "Cyprus",
  231,  "Ethiopia",
  233,  "Estonia",
  246,  "Finland",
  250,  "France",
  268,  "Georgia",
  276,  "Germany",
  288,  "Ghana",
  320,  "Guatemala",
  344,  "Hong Kong SAR",
  348,  "Hungary",
  356,  "India",
  360,  "Indonesia",
  364,  "Iran",
  368,  "Iraq",
  380,  "Italy",
  392,  "Japan",
  400,  "Jordan",
  404,  "Kenya",
  410,  "South Korea",
  422,  "Lebanon",
  440,  "Lithuania",
  458,  "Malaysia",
  466,  "Mali",
  484,  "Mexico",
  498,  "Moldova",
  504,  "Morocco",
  528,  "Netherlands",
  554,  "New Zealand",
  566,  "Nigeria",
  578,  "Norway",
  586,  "Pakistan",
  604,  "Peru",
  608,  "Philippines",
  616,  "Poland",
  620,  "Portugal",
  642,  "Romania",
  643,  "Russia",
  646,  "Rwanda",
  682,  "Saudi Arabia",
  688,  "Serbia",
  704,  "Vietnam",
  705,  "Slovenia",
  710,  "South Africa",
  716,  "Zimbabwe",
  724,  "Spain",
  752,  "Sweden",
  756,  "Switzerland",
  764,  "Thailand",
  780,  "Trinidad & Tobago",
  788,  "Tunisia",
  792,  "Turkey",
  804,  "Ukraine",
  818,  "Egypt",
  826,  "Great Britain",
  840,  "United States",
  854,  "Burkina Faso",
  858,  "Uruguay",
  862,  "Venezuela",
  894,  "Zambia"
)

wvs5 <- wvs5 %>%
  mutate(
    V2    = as.numeric(V2),
    V260  = as.numeric(V260),
    V259  = as.numeric(V259),
    V259A = as.numeric(V259A)
  )

country_n_w5 <- wvs5 %>%
  dplyr::filter(!is.na(V2)) %>%
  dplyr::count(V2, name = "n", sort = TRUE) %>%
  dplyr::left_join(country_lookup_w5, by = "V2") %>%
  dplyr::relocate(country, .before = V2)

country_year_n_w5 <- wvs5 %>%
  dplyr::filter(!is.na(V2), !is.na(V260)) %>%
  dplyr::count(V2, V260, name = "n", sort = TRUE) %>%
  dplyr::left_join(country_lookup_w5, by = "V2") %>%
  dplyr::relocate(country, .before = V2)

print(country_year_n_w5, n = Inf)
## # A tibble: 58 × 4
##    country              V2  V260     n
##    <chr>             <dbl> <dbl> <int>
##  1 Egypt               818  2008  3051
##  2 Colombia            170  2005  3025
##  3 South Africa        710  2006  2988
##  4 Iraq                368  2006  2701
##  5 Iran                364  2007  2667
##  6 Canada              124  2006  2164
##  7 Germany             276  2006  2064
##  8 Russia              643  2006  2033
##  9 Indonesia           360  2006  2015
## 10 India               356  2006  2001
## 11 China               156  2007  1991
## 12 Romania             642  2005  1776
## 13 Mexico              484  2005  1560
## 14 Ghana               288  2007  1534
## 15 Mali                466  2007  1534
## 16 Thailand            764  2007  1534
## 17 Burkina Faso        854  2007  1534
## 18 Rwanda              646  2007  1507
## 19 Brazil               76  2006  1500
## 20 Ethiopia            231  2007  1500
## 21 Georgia             268  2009  1500
## 22 Peru                604  2006  1500
## 23 Zambia              894  2007  1500
## 24 Vietnam             704  2006  1495
## 25 Australia            36  2005  1421
## 26 Turkey              792  2007  1346
## 27 Hong Kong SAR       344  2005  1252
## 28 United States       840  2006  1249
## 29 Switzerland         756  2007  1241
## 30 Taiwan ROC          158  2006  1227
## 31 Serbia              688  2006  1220
## 32 Malaysia            458  2006  1201
## 33 Jordan              400  2007  1200
## 34 South Korea         410  2005  1200
## 35 Morocco             504  2007  1200
## 36 Spain               724  2007  1200
## 37 Japan               392  2005  1096
## 38 Cyprus              196  2006  1050
## 39 Netherlands         528  2006  1050
## 40 Moldova             498  2006  1046
## 41 Great Britain       826  2005  1041
## 42 Slovenia            705  2005  1037
## 43 Norway              578  2007  1025
## 44 Finland             246  2005  1014
## 45 Italy               380  2005  1012
## 46 Hungary             348  2009  1007
## 47 Andorra              20  2005  1003
## 48 Sweden              752  2006  1003
## 49 Argentina            32  2006  1002
## 50 Trinidad & Tobago   780  2006  1002
## 51 Bulgaria            100  2006  1001
## 52 France              250  2006  1001
## 53 Chile               152  2006  1000
## 54 Guatemala           320  2004  1000
## 55 Poland              616  2005  1000
## 56 Ukraine             804  2006  1000
## 57 Uruguay             858  2006  1000
## 58 New Zealand         554  2004   954
wvs5 %>%
  distinct(V2) %>%
  filter(!is.na(V2)) %>%
  left_join(country_lookup_w5, by = "V2") %>%
  filter(is.na(country))
## # A tibble: 0 × 2
## # ℹ 2 variables: V2 <dbl>, country <chr>
wvs5 %>%
  filter(V2 %in% c(586, 50)) %>%
  count(V2)
## # A tibble: 0 × 2
## # ℹ 2 variables: V2 <dbl>, n <int>
macro_map_w5 <- tibble::tribble(
  ~V2,  ~country,                          ~region,

  # India (standalone)
  356,  "India",                            "India",

  # East & Southeast Asia
  156,  "China",                            "East & Southeast Asia",
  344,  "Hong Kong SAR",                    "East & Southeast Asia",
  392,  "Japan",                            "East & Southeast Asia",
  410,  "South Korea",                      "East & Southeast Asia",
  158,  "Taiwan ROC",                       "East & Southeast Asia",
  458,  "Malaysia",                         "East & Southeast Asia",
  608,  "Philippines",                      "East & Southeast Asia",
  764,  "Thailand",                         "East & Southeast Asia",
  360,  "Indonesia",                        "East & Southeast Asia",
  704,  "Vietnam",                          "East & Southeast Asia",

  # Middle East & North Africa (MENA)
  818,  "Egypt",                            "Middle East & North Africa (MENA)",
  368,  "Iraq",                             "Middle East & North Africa (MENA)",
  400,  "Jordan",                           "Middle East & North Africa (MENA)",
  422,  "Lebanon",                          "Middle East & North Africa (MENA)",
  504,  "Morocco",                          "Middle East & North Africa (MENA)",
  788,  "Tunisia",                          "Middle East & North Africa (MENA)",
  792,  "Turkey",                           "Middle East & North Africa (MENA)",
  364,  "Iran",                             "Middle East & North Africa (MENA)",
  682,  "Saudi Arabia",                     "Middle East & North Africa (MENA)",

  # Sub-Saharan Africa
  566,  "Nigeria",                          "Sub-Saharan Africa",
  716,  "Zimbabwe",                         "Sub-Saharan Africa",
  404,  "Kenya",                            "Sub-Saharan Africa",
  231,  "Ethiopia",                         "Sub-Saharan Africa",
  710,  "South Africa",                     "Sub-Saharan Africa",
  288,  "Ghana",                            "Sub-Saharan Africa",
  646,  "Rwanda",                           "Sub-Saharan Africa",
  854,  "Burkina Faso",                     "Sub-Saharan Africa",
  894,  "Zambia",                           "Sub-Saharan Africa",
  466,  "Mali",                             "Sub-Saharan Africa",

  # Latin America & Caribbean
  32,   "Argentina",                        "Latin America & Caribbean",
  76,   "Brazil",                           "Latin America & Caribbean",
  152,  "Chile",                            "Latin America & Caribbean",
  170,  "Colombia",                         "Latin America & Caribbean",
  484,  "Mexico",                           "Latin America & Caribbean",
  604,  "Peru",                             "Latin America & Caribbean",
  858,  "Uruguay",                          "Latin America & Caribbean",
  862,  "Venezuela",                        "Latin America & Caribbean",
  320,  "Guatemala",                        "Latin America & Caribbean",
  780,  "Trinidad & Tobago",                "Latin America & Caribbean",

  # Western Europe & Offshoots
  36,   "Australia",                        "Western Europe & Offshoots",
  124,  "Canada",                           "Western Europe & Offshoots",
  840,  "United States",                    "Western Europe & Offshoots",
  554,  "New Zealand",                      "Western Europe & Offshoots",
  826,  "Great Britain",                    "Western Europe & Offshoots",
  20,   "Andorra",                          "Western Europe & Offshoots",
  246,  "Finland",                          "Western Europe & Offshoots",
  250,  "France",                           "Western Europe & Offshoots",
  276,  "Germany",                          "Western Europe & Offshoots",
  300,  "Greece",                           "Western Europe & Offshoots",
  348,  "Hungary",                          "Western Europe & Offshoots",
  380,  "Italy",                            "Western Europe & Offshoots",
  528,  "Netherlands",                      "Western Europe & Offshoots",
  578,  "Norway",                           "Western Europe & Offshoots",
  620,  "Portugal",                         "Western Europe & Offshoots",
  724,  "Spain",                            "Western Europe & Offshoots",
  752,  "Sweden",                           "Western Europe & Offshoots",
  756,  "Switzerland",                      "Western Europe & Offshoots",
  196,  "Cyprus",                           "Western Europe & Offshoots",

  # Eastern Europe & Post-Soviet
  100,  "Bulgaria",                         "Eastern Europe & Post-Soviet",
  233,  "Estonia",                          "Eastern Europe & Post-Soviet",
  268,  "Georgia",                          "Eastern Europe & Post-Soviet",
  440,  "Lithuania",                        "Eastern Europe & Post-Soviet",
  498,  "Moldova",                          "Eastern Europe & Post-Soviet",
  616,  "Poland",                           "Eastern Europe & Post-Soviet",
  642,  "Romania",                          "Eastern Europe & Post-Soviet",
  643,  "Russia",                           "Eastern Europe & Post-Soviet",
  688,  "Serbia",                           "Eastern Europe & Post-Soviet",
  705,  "Slovenia",                         "Eastern Europe & Post-Soviet",
  804,  "Ukraine",                          "Eastern Europe & Post-Soviet",
  191,  "Croatia",                          "Eastern Europe & Post-Soviet"
)

# ── Attach to wvs5 ────────────────────────────────────────────────────────────
w5_countries <- wvs5 %>%
  distinct(V2) %>%
  filter(!is.na(V2))

macro_map_w5_filtered <- macro_map_w5 %>%
  semi_join(w5_countries, by = "V2")

wvs5 <- wvs5 %>%
  left_join(macro_map_w5_filtered %>% select(V2, macro_region = region), by = "V2")

# ── Checks ────────────────────────────────────────────────────────────────────
missing_map_w5 <- wvs5 %>%
  distinct(V2) %>%
  left_join(macro_map_w5, by = "V2") %>%
  filter(is.na(region))

missing_map_w5   # should be 0 rows
## # A tibble: 0 × 3
## # ℹ 3 variables: V2 <dbl>, country <chr>, region <chr>
wvs5 %>%
  group_by(macro_region) %>%
  summarise(
    n_respondents = n(),
    n_countries   = n_distinct(V2),
    .groups = "drop"
  ) %>%
  arrange(desc(n_respondents))
## # A tibble: 7 × 3
##   macro_region                      n_respondents n_countries
##   <chr>                                     <int>       <int>
## 1 Western Europe & Offshoots                20499          17
## 2 East & Southeast Asia                     13011           9
## 3 Latin America & Caribbean                 12589           9
## 4 Middle East & North Africa (MENA)         12165           6
## 5 Sub-Saharan Africa                        12097           7
## 6 Eastern Europe & Post-Soviet              11613           9
## 7 India                                      2001           1

Demography

# Age Cohorts (V237 = age in Wave 5)
wvs5 <- wvs5%>%
  mutate(
    V237 = as.numeric(V237),
    age = V237,
    age_group = case_when(
      age < 25 ~ "18–24",
      age < 35 ~ "25–34",
      age < 45 ~ "35–44",
      age < 55 ~ "45–54",
      age < 65 ~ "55–64",
      age >= 65 ~ "65+",
      TRUE ~ NA_character_
    )
  )

age_region_w5 <- wvs5%>%
  filter(!is.na(macro_region), !is.na(age_group)) %>%
  count(macro_region, age_group) %>%
  group_by(macro_region) %>%
  mutate(share = n / sum(n)) %>%
  ungroup()

kable(
  age_region_w5,
  digits = 3,
  caption = "Age-group distribution by macro region (Wave 5)"
)
Age-group distribution by macro region (Wave 5)
macro_region age_group n share
East & Southeast Asia 18–24 2145 0.165
East & Southeast Asia 25–34 2631 0.202
East & Southeast Asia 35–44 2894 0.222
East & Southeast Asia 45–54 2507 0.193
East & Southeast Asia 55–64 1664 0.128
East & Southeast Asia 65+ 1170 0.090
Eastern Europe & Post-Soviet 18–24 1674 0.144
Eastern Europe & Post-Soviet 25–34 2124 0.183
Eastern Europe & Post-Soviet 35–44 2157 0.186
Eastern Europe & Post-Soviet 45–54 2203 0.190
Eastern Europe & Post-Soviet 55–64 1622 0.140
Eastern Europe & Post-Soviet 65+ 1833 0.158
India 18–24 213 0.106
India 25–34 522 0.261
India 35–44 501 0.250
India 45–54 368 0.184
India 55–64 207 0.103
India 65+ 190 0.095
Latin America & Caribbean 18–24 2543 0.202
Latin America & Caribbean 25–34 3097 0.246
Latin America & Caribbean 35–44 2585 0.205
Latin America & Caribbean 45–54 1898 0.151
Latin America & Caribbean 55–64 1354 0.108
Latin America & Caribbean 65+ 1112 0.088
Middle East & North Africa (MENA) 18–24 2525 0.208
Middle East & North Africa (MENA) 25–34 3561 0.293
Middle East & North Africa (MENA) 35–44 2707 0.223
Middle East & North Africa (MENA) 45–54 1751 0.144
Middle East & North Africa (MENA) 55–64 991 0.081
Middle East & North Africa (MENA) 65+ 630 0.052
Sub-Saharan Africa 18–24 3556 0.294
Sub-Saharan Africa 25–34 3612 0.299
Sub-Saharan Africa 35–44 2207 0.182
Sub-Saharan Africa 45–54 1328 0.110
Sub-Saharan Africa 55–64 831 0.069
Sub-Saharan Africa 65+ 563 0.047
Western Europe & Offshoots 18–24 2260 0.110
Western Europe & Offshoots 25–34 3254 0.159
Western Europe & Offshoots 35–44 4097 0.200
Western Europe & Offshoots 45–54 3662 0.179
Western Europe & Offshoots 55–64 3371 0.164
Western Europe & Offshoots 65+ 3855 0.188
# Gender (V235: 1 = Male, 2 = Female)
wvs5 <- wvs5%>%
  mutate(
    V235 = as.numeric(V235),
    gender = case_when(
      V235 == 1 ~ "Male",
      V235 == 2 ~ "Female",
      TRUE ~ NA_character_
    )
  )

gender_region_w5 <- wvs5%>%
  filter(!is.na(macro_region), !is.na(gender)) %>%
  count(macro_region, gender) %>%
  group_by(macro_region) %>%
  mutate(share = n / sum(n)) %>%
  ungroup()

gender_region_w5
## # A tibble: 14 × 4
##    macro_region                      gender     n share
##    <chr>                             <chr>  <int> <dbl>
##  1 East & Southeast Asia             Female  6628 0.510
##  2 East & Southeast Asia             Male    6377 0.490
##  3 Eastern Europe & Post-Soviet      Female  6244 0.538
##  4 Eastern Europe & Post-Soviet      Male    5369 0.462
##  5 India                             Female   861 0.431
##  6 India                             Male    1137 0.569
##  7 Latin America & Caribbean         Female  6651 0.528
##  8 Latin America & Caribbean         Male    5938 0.472
##  9 Middle East & North Africa (MENA) Female  6478 0.534
## 10 Middle East & North Africa (MENA) Male    5658 0.466
## 11 Sub-Saharan Africa                Female  5986 0.495
## 12 Sub-Saharan Africa                Male    6095 0.505
## 13 Western Europe & Offshoots        Female 10813 0.529
## 14 Western Europe & Offshoots        Male    9644 0.471
wvs5%>%
  summarise(
    missing_age    = sum(is.na(V237)),
    missing_gender = sum(is.na(V235))
  )
## # A tibble: 1 × 2
##   missing_age missing_gender
##         <int>          <int>
## 1           0              0
# Missing variables by macro_region
wvs5%>%
  group_by(macro_region) %>%
  summarise(
    n_obs          = n(),
    missing_age    = sum(is.na(V237)),
    missing_gender = sum(is.na(V235))
  )
## # A tibble: 7 × 4
##   macro_region                      n_obs missing_age missing_gender
##   <chr>                             <int>       <int>          <int>
## 1 East & Southeast Asia             13011           0              0
## 2 Eastern Europe & Post-Soviet      11613           0              0
## 3 India                              2001           0              0
## 4 Latin America & Caribbean         12589           0              0
## 5 Middle East & North Africa (MENA) 12165           0              0
## 6 Sub-Saharan Africa                12097           0              0
## 7 Western Europe & Offshoots        20499           0              0

Macro region (Economic system)

# Economic values (Wave 5: V116-V121)
likert_vars_w5 <- paste0("V", 116:121)

wvs5 <- wvs5%>%
  mutate(across(all_of(likert_vars_w5), ~ifelse(as.numeric(.x) < 0, NA, as.numeric(.x))))

# Keep valid cases
wvs_clean_w5 <- wvs5%>%
  filter(!is.na(macro_region))

svy_design_w5 <- svydesign(
  ids     = ~1,
  weights = ~V259,
  data    = wvs_clean_w5
)

# Country-level means first
country_means_w5 <- lapply(likert_vars_w5, function(v){

  svyby(
    as.formula(paste0("~", v)),
    ~V2 + macro_region,
    svy_design_w5,
    svymean,
    na.rm = TRUE
  ) %>%
    rename(country_mean = 3) %>%
    mutate(variable = v)

}) %>% bind_rows()

# Region means (country-weighted)
region_means_w5 <- country_means_w5%>%
  group_by(macro_region, variable) %>%
  summarise(
    mean       = mean(country_mean, na.rm = TRUE),
    n_countries = n(),
    .groups    = "drop"
  )

# Labels for Wave 5 economic values
var_labels_w5 <- c(
  V116 = "Income equality vs Inequality incentives (1=More equal, 10=Larger differences)",
  V117 = "Private vs government ownership of business (1=Private, 10=Government)",
  V118 = "Government vs individual responsibility (1=Government, 10=Individuals)",
  V119 = "Competition good vs harmful (1=Good, 10=Harmful)",
  V120 = "Success: hard work vs luck (1=Hard work, 10=Luck/connections)",
  V121 = "People get rich at expense of others vs Wealth can grow (1=Can get rich at expense, 10=Wealth can grow)"
)
for(v in likert_vars_w5){

  temp_table <- region_means_w5%>%
    filter(variable == v) %>%
    select(macro_region, mean, n_countries) %>%
    arrange(mean)

  print(
    kable(
      temp_table,
      digits     = 2,
      col.names  = c("Macro Region",
                     "Mean (country-weighted, 1–10)",
                     "N countries"),
      caption    = paste("Regional comparison:", var_labels_w5[v]),
      format     = "html"
    ) %>%
      kable_styling(full_width = FALSE)
  )

  cat("<br><br>")
}
Regional comparison: Income equality vs Inequality incentives (1=More equal, 10=Larger differences)
Macro Region Mean (country-weighted, 1–10) N countries
India 4.79 1
Western Europe & Offshoots 5.35 17
Middle East & North Africa (MENA) 5.51 6
Eastern Europe & Post-Soviet 6.00 9
Latin America & Caribbean 6.04 9
East & Southeast Asia 6.35 9
Sub-Saharan Africa 6.68 7


Regional comparison: Private vs government ownership of business (1=Private, 10=Government)
Macro Region Mean (country-weighted, 1–10) N countries
Western Europe & Offshoots 4.00 17
Eastern Europe & Post-Soviet 5.00 9
Sub-Saharan Africa 5.54 7
East & Southeast Asia 5.63 9
India 5.85 1
Latin America & Caribbean 6.05 9
Middle East & North Africa (MENA) 6.05 6


Regional comparison: Government vs individual responsibility (1=Government, 10=Individuals)
Macro Region Mean (country-weighted, 1–10) N countries
Middle East & North Africa (MENA) 3.50 6
Eastern Europe & Post-Soviet 4.24 9
India 4.47 1
East & Southeast Asia 4.99 9
Latin America & Caribbean 5.02 9
Sub-Saharan Africa 5.07 7
Western Europe & Offshoots 5.45 17


Regional comparison: Competition good vs harmful (1=Good, 10=Harmful)
Macro Region Mean (country-weighted, 1–10) N countries
Middle East & North Africa (MENA) 2.73 6
India 2.78 1
Sub-Saharan Africa 3.66 7
East & Southeast Asia 3.94 9
Eastern Europe & Post-Soviet 3.98 9
Latin America & Caribbean 4.00 9
Western Europe & Offshoots 4.01 17


Regional comparison: Success: hard work vs luck (1=Hard work, 10=Luck/connections)
Macro Region Mean (country-weighted, 1–10) N countries
Middle East & North Africa (MENA) 3.02 6
India 3.45 1
East & Southeast Asia 3.69 9
Latin America & Caribbean 3.95 9
Sub-Saharan Africa 4.16 7
Western Europe & Offshoots 4.67 17
Eastern Europe & Post-Soviet 4.86 9


Regional comparison: People get rich at expense of others vs Wealth can grow (1=Can get rich at expense, 10=Wealth can grow)
Macro Region Mean (country-weighted, 1–10) N countries
Middle East & North Africa (MENA) 4.63 6
India 5.45 1
Eastern Europe & Post-Soviet 5.94 9
Sub-Saharan Africa 5.96 7
East & Southeast Asia 6.05 9
Western Europe & Offshoots 6.09 17
Latin America & Caribbean 6.28 9



Macro region (democratic system)

# Democratic system variables (Wave 5: V152-V162)
demo_vars_w5 <- paste0("V", 152:162)

# Remove invalid codes
wvs5 <- wvs5%>%
  mutate(across(all_of(demo_vars_w5), ~ifelse(as.numeric(.x) < 0, NA, as.numeric(.x))))

# Keep valid cases
wvs_clean_demo_w5 <- wvs5%>%
  filter(!is.na(macro_region))

# Survey design
svy_design_demo_w5 <- svydesign(
  ids     = ~1,
  weights = ~V259,
  data    = wvs_clean_demo_w5
)

# Survey-weighted country means
country_means_demo_w5 <- lapply(demo_vars_w5, function(v){

  svyby(
    as.formula(paste0("~", v)),
    ~V2 + macro_region,
    svy_design_demo_w5,
    svymean,
    na.rm = TRUE
  ) %>%
    rename(country_mean = 3) %>%
    mutate(variable = v)

}) %>% bind_rows()

# Macro-region average of country means
region_means_demo_w5 <- country_means_demo_w5%>%
  group_by(macro_region, variable) %>%
  summarise(
    mean        = mean(country_mean, na.rm = TRUE),
    n_countries = n(),
    .groups     = "drop"
  )

# Labels confirmed from questionnaire
demo_labels_w5 <- c(
  V152 = "Democracy: Governments tax the rich and subsidize the poor (1=Not essential, 10=Essential)",
  V153 = "Democracy: Religious authorities interpret the laws (1=Not essential, 10=Essential)",
  V154 = "Democracy: People choose leaders in free elections (1=Not essential, 10=Essential)",
  V155 = "Democracy: People receive state aid for unemployment (1=Not essential, 10=Essential)",
  V156 = "Democracy: Army takes over when government is incompetent (1=Not essential, 10=Essential)",
  V157 = "Democracy: Civil rights protect people's liberty against oppression (1=Not essential, 10=Essential)",
  V158 = "Democracy: The economy is prospering (1=Not essential, 10=Essential)",
  V159 = "Democracy: Criminals are severely punished (1=Not essential, 10=Essential)",
  V160 = "Democracy: People can change the laws in referendums (1=Not essential, 10=Essential)",
  V161 = "Democracy: Women have the same rights as men (1=Not essential, 10=Essential)",
  V162 = "Importance of democracy (1=Not at all important, 10=Absolutely important)"
)
for(v in demo_vars_w5){

  temp_table <- region_means_demo_w5%>%
    filter(variable == v) %>%
    select(macro_region, mean, n_countries) %>%
    arrange(desc(mean))

  print(
    kable(
      temp_table,
      digits    = 2,
      col.names = c("Macro Region",
                    "Mean (country-weighted, 1–10)",
                    "N countries"),
      caption   = paste("Regional comparison:", demo_labels_w5[v]),
      format    = "html"
    ) %>%
      kable_styling(full_width = FALSE)
  )

  cat("<br><br>")
}
Regional comparison: Democracy: Governments tax the rich and subsidize the poor (1=Not essential, 10=Essential)
Macro Region Mean (country-weighted, 1–10) N countries
India 8.13 1
Middle East & North Africa (MENA) 7.51 6
East & Southeast Asia 6.30 9
Eastern Europe & Post-Soviet 6.28 9
Sub-Saharan Africa 6.12 7
Western Europe & Offshoots 5.70 17
Latin America & Caribbean 4.56 9


Regional comparison: Democracy: Religious authorities interpret the laws (1=Not essential, 10=Essential)
Macro Region Mean (country-weighted, 1–10) N countries
Middle East & North Africa (MENA) 6.22 6
Sub-Saharan Africa 4.96 7
East & Southeast Asia 4.20 9
India 4.17 1
Eastern Europe & Post-Soviet 3.86 9
Latin America & Caribbean 3.25 9
Western Europe & Offshoots 2.36 17


Regional comparison: Democracy: People choose leaders in free elections (1=Not essential, 10=Essential)
Macro Region Mean (country-weighted, 1–10) N countries
Eastern Europe & Post-Soviet 8.73 9
India 8.62 1
Middle East & North Africa (MENA) 8.58 6
Sub-Saharan Africa 8.35 7
Western Europe & Offshoots 7.75 17
East & Southeast Asia 7.27 9
Latin America & Caribbean 6.57 9


Regional comparison: Democracy: People receive state aid for unemployment (1=Not essential, 10=Essential)
Macro Region Mean (country-weighted, 1–10) N countries
India 8.30 1
Eastern Europe & Post-Soviet 7.97 9
Middle East & North Africa (MENA) 7.70 6
Sub-Saharan Africa 6.99 7
Western Europe & Offshoots 6.45 17
East & Southeast Asia 6.13 9
Latin America & Caribbean 5.30 9


Regional comparison: Democracy: Army takes over when government is incompetent (1=Not essential, 10=Essential)
Macro Region Mean (country-weighted, 1–10) N countries
Middle East & North Africa (MENA) 5.92 6
India 5.47 1
Sub-Saharan Africa 4.24 7
Eastern Europe & Post-Soviet 4.15 9
East & Southeast Asia 4.13 9
Latin America & Caribbean 3.37 9
Western Europe & Offshoots 2.69 17


Regional comparison: Democracy: Civil rights protect people’s liberty against oppression (1=Not essential, 10=Essential)
Macro Region Mean (country-weighted, 1–10) N countries
Eastern Europe & Post-Soviet 8.40 9
Middle East & North Africa (MENA) 8.13 6
India 7.95 1
Sub-Saharan Africa 7.42 7
Western Europe & Offshoots 7.24 17
East & Southeast Asia 6.96 9
Latin America & Caribbean 5.97 9


Regional comparison: Democracy: The economy is prospering (1=Not essential, 10=Essential)
Macro Region Mean (country-weighted, 1–10) N countries
Middle East & North Africa (MENA) 8.50 6
Eastern Europe & Post-Soviet 8.37 9
East & Southeast Asia 7.91 9
Sub-Saharan Africa 7.75 7
India 7.39 1
Western Europe & Offshoots 6.27 17
Latin America & Caribbean 5.89 9


Regional comparison: Democracy: Criminals are severely punished (1=Not essential, 10=Essential)
Macro Region Mean (country-weighted, 1–10) N countries
Middle East & North Africa (MENA) 8.36 6
Eastern Europe & Post-Soviet 7.92 9
Sub-Saharan Africa 7.83 7
India 7.53 1
East & Southeast Asia 7.12 9
Western Europe & Offshoots 6.35 17
Latin America & Caribbean 5.41 9


Regional comparison: Democracy: People can change the laws in referendums (1=Not essential, 10=Essential)
Macro Region Mean (country-weighted, 1–10) N countries
Eastern Europe & Post-Soviet 8.31 9
Middle East & North Africa (MENA) 8.22 6
Sub-Saharan Africa 7.88 7
India 7.36 1
Western Europe & Offshoots 7.06 17
East & Southeast Asia 6.77 9
Latin America & Caribbean 5.92 9


Regional comparison: Democracy: Women have the same rights as men (1=Not essential, 10=Essential)
Macro Region Mean (country-weighted, 1–10) N countries
Eastern Europe & Post-Soviet 8.89 9
India 8.21 1
Sub-Saharan Africa 8.18 7
Western Europe & Offshoots 8.06 17
Middle East & North Africa (MENA) 7.60 6
East & Southeast Asia 7.35 9
Latin America & Caribbean 6.79 9


Regional comparison: Importance of democracy (1=Not at all important, 10=Absolutely important)
Macro Region Mean (country-weighted, 1–10) N countries
Sub-Saharan Africa 8.64 7
Western Europe & Offshoots 8.40 17
Eastern Europe & Post-Soviet 8.14 9
East & Southeast Asia 7.59 9
Latin America & Caribbean 7.55 9
Middle East & North Africa (MENA) 7.42 6
India 7.08 1



Macro region analysis (value system)

Neighbours

# Neighbours rejection items (Wave 5: V34-V42, excluding V43 optional)
neigh_vars_w5 <- paste0("V", 34:42)

# Clean negative codes
wvs5 <- wvs5%>%
  mutate(across(all_of(neigh_vars_w5), ~ifelse(as.numeric(.x) < 0, NA, as.numeric(.x))))

wvs_clean_neigh_w5 <- wvs5%>%
  filter(!is.na(macro_region))

svy_design_neigh_w5 <- svydesign(
  ids     = ~1,
  weights = ~V259,
  data    = wvs_clean_neigh_w5
)

# Survey-weighted country proportions rejecting each group (1 = mentioned/rejected)
country_prop_neigh_w5 <- lapply(neigh_vars_w5, function(v){

  svyby(
    as.formula(paste0("~I(", v, "== 1)")),
    ~V2 + macro_region,
    svy_design_neigh_w5,
    svymean,
    na.rm = TRUE
  ) %>%
    rename(country_prop = 3) %>%
    mutate(variable = v)

}) %>% bind_rows()

# Macro-region average of country proportions
region_prop_neigh_w5 <- country_prop_neigh_w5%>%
  group_by(macro_region, variable) %>%
  summarise(
    mean_prop   = mean(country_prop, na.rm = TRUE),
    n_countries = n(),
    .groups     = "drop"
  )

# Labels confirmed from questionnaire
neigh_labels_w5 <- c(
  V34 = "Drug addicts",
  V35 = "People of a different race",
  V36 = "People who have AIDS",
  V37 = "Immigrants/foreign workers",
  V38 = "Homosexuals",
  V39 = "People of a different religion",
  V40 = "Heavy drinkers",
  V41 = "Unmarried couples living together",
  V42 = "People who speak a different language"
)
for(v in neigh_vars_w5){

  temp_table <- region_prop_neigh_w5%>%
    filter(variable == v) %>%
    mutate(mean_prop = round(mean_prop * 100, 1)) %>%
    select(macro_region, mean_prop, n_countries) %>%
    arrange(desc(mean_prop))

  print(
    kable(
      temp_table,
      digits    = 1,
      col.names = c("Macro Region",
                    "% Rejecting (country-weighted)",
                    "N countries"),
      caption   = paste("Undesirable neighbours:", neigh_labels_w5[v]),
      format    = "html"
    ) %>%
      kable_styling(full_width = FALSE)
  )

  cat("<br><br>")
}
Undesirable neighbours: Drug addicts
Macro Region % Rejecting (country-weighted) N countries
India 46.2 1
Latin America & Caribbean 29.7 9
Western Europe & Offshoots 24.9 17
Sub-Saharan Africa 19.4 7
Eastern Europe & Post-Soviet 16.0 9
East & Southeast Asia 14.9 9
Middle East & North Africa (MENA) 4.5 6


Undesirable neighbours: People of a different race
Macro Region % Rejecting (country-weighted) N countries
Latin America & Caribbean 95.0 9
Western Europe & Offshoots 92.3 17
Eastern Europe & Post-Soviet 82.3 9
Sub-Saharan Africa 79.2 7
East & Southeast Asia 66.9 9
India 56.5 1
Middle East & North Africa (MENA) 44.0 6


Undesirable neighbours: People who have AIDS
Macro Region % Rejecting (country-weighted) N countries
Western Europe & Offshoots 81.8 17
Latin America & Caribbean 80.0 9
Sub-Saharan Africa 72.1 7
India 56.3 1
Eastern Europe & Post-Soviet 47.0 9
East & Southeast Asia 30.6 9
Middle East & North Africa (MENA) 12.4 6


Undesirable neighbours: Immigrants/foreign workers
Macro Region % Rejecting (country-weighted) N countries
Western Europe & Offshoots 88.2 17
Latin America & Caribbean 83.5 9
Eastern Europe & Post-Soviet 79.7 9
Sub-Saharan Africa 76.4 7
India 65.0 1
East & Southeast Asia 58.7 9
Middle East & North Africa (MENA) 36.6 6


Undesirable neighbours: Homosexuals
Macro Region % Rejecting (country-weighted) N countries
Western Europe & Offshoots 82.1 17
Latin America & Caribbean 68.1 9
India 59.7 1
Eastern Europe & Post-Soviet 38.9 9
East & Southeast Asia 37.6 9
Sub-Saharan Africa 30.1 7
Middle East & North Africa (MENA) 4.1 6


Undesirable neighbours: People of a different religion
Macro Region % Rejecting (country-weighted) N countries
Western Europe & Offshoots 88.3 17
Latin America & Caribbean 83.3 9
Eastern Europe & Post-Soviet 82.5 9
Sub-Saharan Africa 79.7 7
East & Southeast Asia 59.6 9
India 56.0 1
Middle East & North Africa (MENA) 51.0 6


Undesirable neighbours: Heavy drinkers
Macro Region % Rejecting (country-weighted) N countries
India 51.6 1
Latin America & Caribbean 49.6 9
Western Europe & Offshoots 38.4 17
Sub-Saharan Africa 36.1 7
East & Southeast Asia 27.0 9
Eastern Europe & Post-Soviet 25.3 9
Middle East & North Africa (MENA) 8.0 6


Undesirable neighbours: Unmarried couples living together
Macro Region % Rejecting (country-weighted) N countries
Western Europe & Offshoots 89.9 17
Eastern Europe & Post-Soviet 88.2 9
Latin America & Caribbean 84.5 9
Sub-Saharan Africa 70.1 7
India 56.6 1
East & Southeast Asia 47.3 9
Middle East & North Africa (MENA) 15.1 6


Undesirable neighbours: People who speak a different language
Macro Region % Rejecting (country-weighted) N countries
Eastern Europe & Post-Soviet 88.0 9
Western Europe & Offshoots 87.1 17
Sub-Saharan Africa 80.1 7
Latin America & Caribbean 72.9 9
East & Southeast Asia 60.0 9
India 59.9 1
Middle East & North Africa (MENA) 33.5 6



Moral-permissiveness

# Moral permissiveness (Wave 5: V198-V208)
moral_vars_w5 <- paste0("V", 198:208)

# Clean negative codes
wvs5 <- wvs5%>%
  mutate(across(all_of(moral_vars_w5), ~ifelse(as.numeric(.x) < 0, NA, as.numeric(.x))))

wvs_clean_moral_w5 <- wvs5%>%
  filter(!is.na(macro_region))

svy_design_moral_w5 <- svydesign(
  ids     = ~1,
  weights = ~V259,
  data    = wvs_clean_moral_w5
)

# Survey-weighted country means
country_moral_w5 <- lapply(moral_vars_w5, function(v){

  svyby(
    as.formula(paste0("~", v)),
    ~V2 + macro_region,
    svy_design_moral_w5,
    svymean,
    na.rm = TRUE
  ) %>%
    rename(country_mean = 3) %>%
    mutate(variable = v)

}) %>% bind_rows()

# Macro-region average of country means
region_moral_w5 <- country_moral_w5%>%
  group_by(macro_region, variable) %>%
  summarise(
    mean_score  = mean(country_mean, na.rm = TRUE),
    n_countries = n(),
    .groups     = "drop"
  )

# Labels exactly as in questionnaire
moral_labels_w5 <- c(
  V198 = "Claiming government benefits to which you are not entitled",
  V199 = "Avoiding a fare on public transport",
  V200 = "Cheating on taxes if you have a chance",
  V201 = "Someone accepting a bribe in the course of their duties",
  V202 = "Homosexuality",
  V203 = "Prostitution",
  V204 = "Abortion",
  V205 = "Divorce",
  V206 = "Euthanasia—ending the life of the incurable sick",
  V207 = "Suicide",
  V208 = "For a man to beat his wife"
)
for(v in moral_vars_w5){

  temp_table <- region_moral_w5%>%
    filter(variable == v) %>%
    mutate(mean_score = round(mean_score, 1)) %>%
    select(macro_region, mean_score, n_countries) %>%
    arrange(desc(mean_score))

  print(
    kable(
      temp_table,
      digits    = 1,
      col.names = c("Macro Region",
                    "Mean score (1–10)",
                    "N countries"),
      caption   = paste("Moral permissiveness:", moral_labels_w5[v]),
      format    = "html"
    ) %>%
      kable_styling(full_width = FALSE)
  )

  cat("<br><br>")
}
Moral permissiveness: Claiming government benefits to which you are not entitled
Macro Region Mean score (1–10) N countries
India 3.1 1
East & Southeast Asia 3.0 9
Eastern Europe & Post-Soviet 2.8 9
Latin America & Caribbean 2.7 9
Sub-Saharan Africa 2.7 7
Western Europe & Offshoots 2.1 17
Middle East & North Africa (MENA) 1.9 6


Moral permissiveness: Avoiding a fare on public transport
Macro Region Mean score (1–10) N countries
India 3.3 1
Eastern Europe & Post-Soviet 3.1 9
Latin America & Caribbean 2.7 9
Sub-Saharan Africa 2.7 7
Western Europe & Offshoots 2.4 17
East & Southeast Asia 2.3 9
Middle East & North Africa (MENA) 1.7 6


Moral permissiveness: Cheating on taxes if you have a chance
Macro Region Mean score (1–10) N countries
India 3.0 1
Eastern Europe & Post-Soviet 2.9 9
Sub-Saharan Africa 2.4 7
Western Europe & Offshoots 2.2 17
East & Southeast Asia 2.1 9
Latin America & Caribbean 2.0 9
Middle East & North Africa (MENA) 1.5 6


Moral permissiveness: Someone accepting a bribe in the course of their duties
Macro Region Mean score (1–10) N countries
India 3.0 1
Sub-Saharan Africa 2.5 7
Eastern Europe & Post-Soviet 2.1 9
East & Southeast Asia 1.9 9
Latin America & Caribbean 1.7 9
Western Europe & Offshoots 1.7 17
Middle East & North Africa (MENA) 1.4 6


Moral permissiveness: Homosexuality
Macro Region Mean score (1–10) N countries
Western Europe & Offshoots 6.1 17
Latin America & Caribbean 3.7 9
Eastern Europe & Post-Soviet 3.1 9
India 3.0 1
East & Southeast Asia 2.9 9
Sub-Saharan Africa 2.1 7
Middle East & North Africa (MENA) 0.7 6


Moral permissiveness: Prostitution
Macro Region Mean score (1–10) N countries
Western Europe & Offshoots 3.9 17
India 3.1 1
Latin America & Caribbean 3.0 9
Eastern Europe & Post-Soviet 2.8 9
Sub-Saharan Africa 2.4 7
East & Southeast Asia 2.3 9
Middle East & North Africa (MENA) 0.7 6


Moral permissiveness: Abortion
Macro Region Mean score (1–10) N countries
Western Europe & Offshoots 5.4 17
Eastern Europe & Post-Soviet 4.1 9
India 3.3 1
East & Southeast Asia 3.0 9
Sub-Saharan Africa 2.6 7
Latin America & Caribbean 2.5 9
Middle East & North Africa (MENA) 1.5 6


Moral permissiveness: Divorce
Macro Region Mean score (1–10) N countries
Western Europe & Offshoots 6.7 17
Eastern Europe & Post-Soviet 5.1 9
Latin America & Caribbean 4.8 9
East & Southeast Asia 3.9 9
India 3.9 1
Sub-Saharan Africa 3.6 7
Middle East & North Africa (MENA) 3.2 6


Moral permissiveness: Euthanasia—ending the life of the incurable sick
Macro Region Mean score (1–10) N countries
Western Europe & Offshoots 5.7 17
Eastern Europe & Post-Soviet 4.3 9
East & Southeast Asia 4.2 9
India 3.9 1
Latin America & Caribbean 3.3 9
Sub-Saharan Africa 2.9 7
Middle East & North Africa (MENA) 1.7 6


Moral permissiveness: Suicide
Macro Region Mean score (1–10) N countries
India 3.4 1
Western Europe & Offshoots 3.3 17
Eastern Europe & Post-Soviet 2.4 9
East & Southeast Asia 2.3 9
Sub-Saharan Africa 2.3 7
Latin America & Caribbean 1.9 9
Middle East & North Africa (MENA) 1.1 6


Moral permissiveness: For a man to beat his wife
Macro Region Mean score (1–10) N countries
India 3.1 1
Sub-Saharan Africa 3.1 7
Eastern Europe & Post-Soviet 1.9 9
East & Southeast Asia 1.7 9
Western Europe & Offshoots 1.3 17
Latin America & Caribbean 1.2 9
Middle East & North Africa (MENA) 1.2 6



1: Never justifiable and 10: Always justifiable

Institutional Trust

# Trust variables (Wave 5: V131-V145)
trust_vars_w5 <- paste0("V", 131:145)

# Labels exactly as in questionnaire
trust_labels_w5 <- c(
  V131 = "Churches/ religious leaders",
  V132 = "Armed forces",
  V133 = "Press",
  V134 = "Television",
  V135 = "Labor unions",
  V136 = "Police",
  V137 = "Courts",
  V138 = "Government (in your nation's capital)",
  V139 = "Political parties",
  V140 = "Parliament",
  V141 = "Civil service",
  V142 = "Major companies",
  V143 = "Environmental organizations",
  V144 = "Women's organizations",
  V145 = "Charitable or humanitarian organizations"
)

# Clean negative codes, filter valid cases
wvs_clean_trust_w5 <- wvs5%>%
  mutate(across(all_of(trust_vars_w5), ~ifelse(as.numeric(.x) < 0, NA, as.numeric(.x)))) %>%
  filter(!is.na(macro_region), !is.na(V259))
for(v in trust_vars_w5){

  temp_table <- wvs_clean_trust_w5%>%
    filter(!is.na(.data[[v]])) %>%
    group_by(macro_region) %>%
    summarise(
      prop_high = round(
        sum(V259 * (.data[[v]] <= 2)) / sum(V259) * 100, 1
      ),
      .groups = "drop"
    ) %>%
    arrange(desc(prop_high))

  print(
    kable(
      temp_table,
      digits    = 1,
      col.names = c("Macro Region",
                    "High confidence % (1–2)"),
      caption   = paste("High confidence:", trust_labels_w5[v]),
      format    = "html"
    ) %>%
      kable_styling(full_width = FALSE)
  )

  cat("<br><br>")
}
High confidence: Churches/ religious leaders
Macro Region High confidence % (1–2)
India 83.4
Sub-Saharan Africa 82.5
Middle East & North Africa (MENA) 80.8
Eastern Europe & Post-Soviet 71.0
Latin America & Caribbean 68.2
East & Southeast Asia 58.6
Western Europe & Offshoots 48.4


High confidence: Armed forces
Macro Region High confidence % (1–2)
India 83.3
East & Southeast Asia 70.9
Middle East & North Africa (MENA) 70.3
Sub-Saharan Africa 65.0
Western Europe & Offshoots 64.7
Eastern Europe & Post-Soviet 62.3
Latin America & Caribbean 50.0


High confidence: Press
Macro Region High confidence % (1–2)
India 75.8
East & Southeast Asia 59.6
Sub-Saharan Africa 54.6
Middle East & North Africa (MENA) 48.3
Latin America & Caribbean 39.9
Eastern Europe & Post-Soviet 37.0
Western Europe & Offshoots 29.8


High confidence: Television
Macro Region High confidence % (1–2)
India 74.9
East & Southeast Asia 64.0
Middle East & North Africa (MENA) 62.1
Sub-Saharan Africa 60.5
Eastern Europe & Post-Soviet 43.9
Latin America & Caribbean 40.5
Western Europe & Offshoots 34.3


High confidence: Labor unions
Macro Region High confidence % (1–2)
India 54.4
East & Southeast Asia 51.7
Sub-Saharan Africa 45.7
Middle East & North Africa (MENA) 41.2
Western Europe & Offshoots 37.3
Eastern Europe & Post-Soviet 29.1
Latin America & Caribbean 27.8


High confidence: Police
Macro Region High confidence % (1–2)
Western Europe & Offshoots 73.9
Middle East & North Africa (MENA) 67.0
East & Southeast Asia 64.7
India 64.1
Sub-Saharan Africa 57.8
Eastern Europe & Post-Soviet 39.0
Latin America & Caribbean 38.0


High confidence: Courts
Macro Region High confidence % (1–2)
India 68.9
East & Southeast Asia 68.2
Middle East & North Africa (MENA) 62.5
Western Europe & Offshoots 59.8
Sub-Saharan Africa 58.1
Latin America & Caribbean 34.1
Eastern Europe & Post-Soviet 32.0


High confidence: Government (in your nation’s capital)
Macro Region High confidence % (1–2)
East & Southeast Asia 60.8
Middle East & North Africa (MENA) 60.3
Sub-Saharan Africa 57.7
India 54.9
Latin America & Caribbean 41.4
Western Europe & Offshoots 39.3
Eastern Europe & Post-Soviet 31.2


High confidence: Political parties
Macro Region High confidence % (1–2)
India 46.4
East & Southeast Asia 43.4
Sub-Saharan Africa 37.6
Middle East & North Africa (MENA) 28.8
Western Europe & Offshoots 20.7
Latin America & Caribbean 17.3
Eastern Europe & Post-Soviet 15.8


High confidence: Parliament
Macro Region High confidence % (1–2)
India 62.4
Sub-Saharan Africa 54.9
East & Southeast Asia 51.3
Middle East & North Africa (MENA) 50.2
Western Europe & Offshoots 38.4
Latin America & Caribbean 22.2
Eastern Europe & Post-Soviet 21.8


High confidence: Civil service
Macro Region High confidence % (1–2)
East & Southeast Asia 61.3
India 54.3
Sub-Saharan Africa 52.9
Middle East & North Africa (MENA) 50.8
Western Europe & Offshoots 47.2
Eastern Europe & Post-Soviet 33.4
Latin America & Caribbean 27.0


High confidence: Major companies
Macro Region High confidence % (1–2)
Sub-Saharan Africa 53.8
India 51.5
East & Southeast Asia 43.4
Middle East & North Africa (MENA) 41.2
Latin America & Caribbean 40.8
Western Europe & Offshoots 36.6
Eastern Europe & Post-Soviet 34.4


High confidence: Environmental organizations
Macro Region High confidence % (1–2)
East & Southeast Asia 65.8
Western Europe & Offshoots 63.0
India 61.4
Sub-Saharan Africa 60.3
Latin America & Caribbean 57.4
Middle East & North Africa (MENA) 54.0
Eastern Europe & Post-Soviet 50.1


High confidence: Women’s organizations
Macro Region High confidence % (1–2)
East & Southeast Asia 67.3
India 64.6
Sub-Saharan Africa 63.1
Western Europe & Offshoots 57.3
Latin America & Caribbean 54.0
Middle East & North Africa (MENA) 50.4
Eastern Europe & Post-Soviet 47.8


High confidence: Charitable or humanitarian organizations
Macro Region High confidence % (1–2)
Middle East & North Africa (MENA) 71.5
Western Europe & Offshoots 66.1
Sub-Saharan Africa 65.0
East & Southeast Asia 64.5
Latin America & Caribbean 60.0
India 56.9
Eastern Europe & Post-Soviet 51.7



Child qualities

# Child quality variables (Wave 5: V12-V21)
child_vars_w5 <- paste0("V", 12:21)

# Labels exactly as in questionnaire
child_labels_w5 <- c(
  V12 = "Independence",
  V13 = "Hard work",
  V14 = "Feeling of responsibility",
  V15 = "Imagination",
  V16 = "Tolerance and respect for other people",
  V17 = "Thrift, saving money and things",
  V18 = "Determination, perseverance",
  V19 = "Religious faith",
  V20 = "Unselfishness",
  V21 = "Obedience"
)

# Clean negative codes
wvs_clean_child_w5 <- wvs5%>%
  mutate(across(all_of(child_vars_w5), ~ifelse(as.numeric(.x) < 0, NA, as.numeric(.x)))) %>%
  filter(!is.na(macro_region), !is.na(V259))

# Country-level weighted proportions (1 = Mentioned/Important)
country_prop_child_w5 <- lapply(child_vars_w5, function(v){

  wvs_clean_child_w5%>%
    filter(!is.na(.data[[v]])) %>%
    group_by(V2, macro_region) %>%
    summarise(
      country_prop = sum(V259 * (.data[[v]] == 1)) / sum(V259),
      variable     = v,
      .groups      = "drop"
    )

}) %>% bind_rows()

# Macro-region average of country proportions (country-weighted)
region_child_w5 <- country_prop_child_w5%>%
  group_by(macro_region, variable) %>%
  summarise(
    mean_prop   = mean(country_prop, na.rm = TRUE),
    n_countries = n(),
    .groups     = "drop"
  )
for(v in child_vars_w5){

  temp_table <- region_child_w5%>%
    filter(variable == v) %>%
    mutate(mean_prop = round(mean_prop * 100, 1)) %>%
    select(macro_region, mean_prop, n_countries) %>%
    arrange(desc(mean_prop))

  print(
    kable(
      temp_table,
      digits    = 1,
      col.names = c("Macro Region",
                    "% Mentioning (country-weighted)",
                    "N countries"),
      caption   = paste("Child quality:", child_labels_w5[v]),
      format    = "html"
    ) %>%
      kable_styling(full_width = FALSE)
  )

  cat("<br><br>")
}
Child quality: Independence
Macro Region % Mentioning (country-weighted) N countries
India 66.9 1
East & Southeast Asia 65.5 9
Western Europe & Offshoots 61.7 17
Eastern Europe & Post-Soviet 47.9 9
Sub-Saharan Africa 47.0 7
Middle East & North Africa (MENA) 42.6 6
Latin America & Caribbean 38.4 9


Child quality: Hard work
Macro Region % Mentioning (country-weighted) N countries
India 81.3 1
Sub-Saharan Africa 74.5 7
Eastern Europe & Post-Soviet 69.7 9
Middle East & North Africa (MENA) 60.3 6
East & Southeast Asia 53.5 9
Latin America & Caribbean 39.9 9
Western Europe & Offshoots 39.6 17


Child quality: Feeling of responsibility
Macro Region % Mentioning (country-weighted) N countries
Western Europe & Offshoots 80.2 17
Latin America & Caribbean 74.2 9
Middle East & North Africa (MENA) 74.2 6
East & Southeast Asia 73.9 9
Eastern Europe & Post-Soviet 73.4 9
India 68.0 1
Sub-Saharan Africa 48.1 7


Child quality: Imagination
Macro Region % Mentioning (country-weighted) N countries
Western Europe & Offshoots 34.4 17
India 25.4 1
East & Southeast Asia 22.4 9
Sub-Saharan Africa 21.9 7
Latin America & Caribbean 20.3 9
Eastern Europe & Post-Soviet 18.5 9
Middle East & North Africa (MENA) 17.3 6


Child quality: Tolerance and respect for other people
Macro Region % Mentioning (country-weighted) N countries
Western Europe & Offshoots 83.0 17
Latin America & Caribbean 74.1 9
Middle East & North Africa (MENA) 70.6 6
Eastern Europe & Post-Soviet 66.5 9
Sub-Saharan Africa 62.2 7
East & Southeast Asia 59.0 9
India 55.8 1


Child quality: Thrift, saving money and things
Macro Region % Mentioning (country-weighted) N countries
India 55.4 1
East & Southeast Asia 52.4 9
Eastern Europe & Post-Soviet 44.4 9
Sub-Saharan Africa 35.4 7
Middle East & North Africa (MENA) 34.5 6
Western Europe & Offshoots 32.5 17
Latin America & Caribbean 30.8 9


Child quality: Determination, perseverance
Macro Region % Mentioning (country-weighted) N countries
Western Europe & Offshoots 48.0 17
Eastern Europe & Post-Soviet 41.8 9
India 40.7 1
East & Southeast Asia 39.9 9
Sub-Saharan Africa 36.5 7
Latin America & Caribbean 29.0 9
Middle East & North Africa (MENA) 28.0 6


Child quality: Religious faith
Macro Region % Mentioning (country-weighted) N countries
Middle East & North Africa (MENA) 74.3 6
Sub-Saharan Africa 56.6 7
Latin America & Caribbean 44.2 9
India 41.3 1
Eastern Europe & Post-Soviet 33.8 9
East & Southeast Asia 25.0 9
Western Europe & Offshoots 18.4 17


Child quality: Unselfishness
Macro Region % Mentioning (country-weighted) N countries
Latin America & Caribbean 41.0 9
Sub-Saharan Africa 37.3 7
Middle East & North Africa (MENA) 36.1 6
Western Europe & Offshoots 34.7 17
India 34.2 1
East & Southeast Asia 28.0 9
Eastern Europe & Post-Soviet 27.1 9


Child quality: Obedience
Macro Region % Mentioning (country-weighted) N countries
Sub-Saharan Africa 62.4 7
India 55.9 1
Middle East & North Africa (MENA) 55.8 6
Latin America & Caribbean 53.6 9
Eastern Europe & Post-Soviet 32.5 9
Western Europe & Offshoots 31.9 17
East & Southeast Asia 24.0 9