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)
WVS_India <- read_excel("D:/Populism and Democrary/World value survey/WVS India.xlsx")
View(WVS_India)
18 of 28 states covered, accounting for 97% of population
Sampling- four‑stage multistage stratified random design
40 Lok Sabha constituencies allocated by state population.
2 assembly constituencies per LS seat (80 ACs).
2 polling stations per AC (=160 PS clusters).
20–25 names drawn per PS from electoral rolls using circular Probability Proportion to Size (PPS) sampling, with ~20% over‑sample to allow substitution within same family and gender.
N=2001, national adult population 18+, both sexes.
gender_india_table <- WVS_India %>%
mutate(gender = case_when(
`V235: Sex` == 1 ~ "Male",
`V235: Sex` == 2 ~ "Female",
TRUE ~ "Missing"
)) %>%
count(gender) %>%
mutate(pct = round(100 * n / sum(n), 1))
print(gender_india_table)
## # A tibble: 3 × 3
## gender n pct
## <chr> <int> <dbl>
## 1 Female 861 43
## 2 Male 1137 56.8
## 3 Missing 3 0.1
# EDUCATION RECODING
education_table <- WVS_India %>%
mutate(education = case_when(
`V238R: Highest educational level: Respondent (recoded into 3 groups)` == 1 ~ "Low (No/Primary)",
`V238R: Highest educational level: Respondent (recoded into 3 groups)` == 2 ~ "Medium (Secondary)",
`V238R: Highest educational level: Respondent (recoded into 3 groups)` == 3 ~ "High (Tertiary)",
TRUE ~ "Missing"
)) %>%
filter(!is.na(`V238R: Highest educational level: Respondent (recoded into 3 groups)`)) %>%
count(education, sort = TRUE) %>%
mutate(pct = round(100 * n / sum(n), 1))
print(education_table)
## # A tibble: 4 × 3
## education n pct
## <chr> <int> <dbl>
## 1 Low (No/Primary) 999 49.9
## 2 Medium (Secondary) 547 27.3
## 3 High (Tertiary) 436 21.8
## 4 Missing 19 0.9
#Religion
religion_table <- WVS_India %>%
mutate(religion_3cat = case_when(
`V185G: Religious denomination -Main group` == 6 ~ "Hindu",
`V185G: Religious denomination -Main group` == 5 ~ "Muslim",
TRUE ~ "Others" # Sikh, Christian, No answer, Buddhist etc
)) %>%
filter(!is.na(`V185G: Religious denomination -Main group`)) %>%
count(religion_3cat, sort = TRUE) %>%
mutate(pct = round(100 * n / sum(n), 1))
print(religion_table)
## # A tibble: 3 × 3
## religion_3cat n pct
## <chr> <int> <dbl>
## 1 Hindu 1513 75.6
## 2 Others 326 16.3
## 3 Muslim 162 8.1
Now we will try to categories respondents based on the following questions V231: Which party would you vote: first choice V233: Party that would never vote We will make two categories - vote for BJP/vote for INC, Never vote for BJP/Never vote for INC
WVS_India <- WVS_India %>%
mutate(
vote_choice = case_when(
`V231: Which party would you vote: first choice` == 356068 ~ "Vote BJP",
`V231: Which party would you vote: first choice` == 356067 ~ "Vote INC",
!is.na(`V231: Which party would you vote: first choice`) ~ "Vote Other",
TRUE ~ NA_character_
),
party_reject = case_when(
`V233: Party that would never vote` == 356068 ~ "Never BJP",
`V233: Party that would never vote` == 356067 ~ "Never INC",
!is.na(`V233: Party that would never vote`) ~ "Reject Other",
TRUE ~ NA_character_
)
)
table(WVS_India$vote_choice, WVS_India$party_reject, useNA = "ifany")
##
## Never BJP Never INC Reject Other
## Vote BJP 5 57 361
## Vote INC 111 11 515
## Vote Other 115 89 737
party_v114_vote <- WVS_India %>%
filter(vote_choice %in% c("Vote BJP", "Vote INC", "Vote Other")) %>%
filter(`V114: Self positioning in political scale` %in% 1:10) %>%
group_by(vote_choice) %>%
summarise(
leftright_mean = round(mean(`V114: Self positioning in political scale`, na.rm = TRUE), 2),
n_valid = n(),
.groups = "drop"
)
print(party_v114_vote)
## # A tibble: 3 × 3
## vote_choice leftright_mean n_valid
## <chr> <dbl> <int>
## 1 Vote BJP 5.39 233
## 2 Vote INC 4.46 295
## 3 Vote Other 3.85 456
party_v114_vote %>%
ggplot(aes(x = reorder(vote_choice, leftright_mean),
y = leftright_mean,
fill = vote_choice)) +
geom_col(alpha = 0.8) +
geom_text(aes(label = paste0(leftright_mean, " (n=", n_valid, ")")),
hjust = -0.1, size = 3.5) +
coord_flip() +
scale_fill_brewer(type = "qual", palette = "Set2") +
theme_minimal(base_size = 12) +
labs(title = "Left–Right Self-Placement by Vote Choice",
subtitle = "V114: 1 = Left, 10 = Right",
x = "Vote Choice", y = "Mean Score",
caption = "Valid responses only") +
theme(legend.position = "none")
party_v114_reject <- WVS_India %>%
filter(party_reject %in% c("Never BJP", "Never INC")) %>%
filter(`V114: Self positioning in political scale` %in% 1:10) %>%
group_by(party_reject) %>%
summarise(
leftright_mean = round(mean(`V114: Self positioning in political scale`, na.rm = TRUE), 2),
n_valid = n(),
.groups = "drop"
)
print(party_v114_reject)
## # A tibble: 2 × 3
## party_reject leftright_mean n_valid
## <chr> <dbl> <int>
## 1 Never BJP 4.63 114
## 2 Never INC 5.56 88
party_v114_reject %>%
ggplot(aes(x = reorder(party_reject, leftright_mean),
y = leftright_mean,
fill = party_reject)) +
geom_col(alpha = 0.8) +
geom_text(aes(label = paste0(leftright_mean, " (n=", n_valid, ")")),
hjust = -0.1, size = 3.5) +
coord_flip() +
scale_fill_brewer(type = "qual", palette = "Set1") +
theme_minimal(base_size = 12) +
labs(title = "Left–Right Self-Placement by Party Rejection",
subtitle = "V114: 1 = Left, 10 = Right",
x = "Party Rejected", y = "Mean Score",
caption = "Valid responses only") +
theme(legend.position = "none")
WVS_India <- WVS_India %>%
rename(
V157 = matches("^V157")
)
democracy_long <- WVS_India %>%
select(
vote_choice,
party_reject,
V152 = `V152: Democracy: Governments tax the rich and subsidize the poor.`,
V153 = `V153: Democracy: Religious authorities interpret the laws.`,
V154 = `V154: Democracy: People choose their leaders in free elections.`,
V155 = `V155: Democracy: People receive state aid for unemployment.`,
V156 = `V156: Democracy: The army takes over when government is incompetent.`,
V157,
V158 = `V158: Democracy: The economy is prospering.`,
V159 = `V159: Democracy: Criminals are severely punished.`,
V160 = `V160: Democracy: People can change the laws in referendums.`,
V161 = `V161: Democracy: Women have the same rights as men.`
) %>%
pivot_longer(
V152:V161,
names_to = "item",
values_to = "score"
) %>%
filter(score %in% 1:10)
democracy_long <- democracy_long %>%
mutate(
item_label = recode(item,
"V152" = "Tax rich, subsidize poor",
"V153" = "Religious authorities interpret laws",
"V154" = "Free elections",
"V155" = "Unemployment aid",
"V156" = "Army rule if govt incompetent",
"V157" = "Civil rights protect liberty",
"V158" = "Economy prospering",
"V159" = "Criminals severely punished",
"V160" = "Referendums change laws",
"V161" = "Women equal rights"
)
)
democracy_vote_profile <- democracy_long %>%
filter(vote_choice %in% c("Vote BJP", "Vote INC")) %>%
group_by(vote_choice, item_label) %>%
summarise(mean_score = mean(score, na.rm = TRUE), .groups = "drop")
ggplot(democracy_vote_profile,
aes(x = reorder(item_label, mean_score),
y = mean_score,
fill = vote_choice)) +
geom_col(position = "dodge", alpha = 0.8) +
coord_flip() +
theme_minimal() +
labs(title = "Democracy Profile by Party Acceptance",
subtitle = "Mean importance scores across all democracy items",
x = "", y = "Mean score") +
theme(legend.title = element_blank())
democracy_reject_profile <- democracy_long %>%
filter(party_reject %in% c("Never BJP", "Never INC")) %>%
group_by(party_reject, item_label) %>%
summarise(mean_score = mean(score, na.rm = TRUE), .groups = "drop")
ggplot(democracy_reject_profile,
aes(x = reorder(item_label, mean_score),
y = mean_score,
fill = party_reject)) +
geom_col(position = "dodge", alpha = 0.8) +
coord_flip() +
theme_minimal() +
labs(title = "Democracy Profile by Party Rejection",
subtitle = "Mean importance scores across all democracy items",
x = "", y = "Mean score") +
theme(legend.title = element_blank())
Well the most interesting thing is those who are never gonna vote for BJP has the highest means for Religious authorities interpret the laws as an essential characteristics of democracy.
Actually the most interesting lot is “never bjp” the behavior is very contradictory to normal assumptions
religion_by_rejection <- WVS_India %>%
mutate(
religion_3cat = case_when(
`V185G: Religious denomination -Main group` == 6 ~ "Hindu",
`V185G: Religious denomination -Main group` == 5 ~ "Muslim",
TRUE ~ "Others"
)
) %>%
filter(
party_reject %in% c("Never BJP", "Never INC"),
!is.na(`V185G: Religious denomination -Main group`)
) %>%
count(party_reject, religion_3cat) %>%
group_by(party_reject) %>%
mutate(pct = round(100 * n / sum(n), 1)) %>%
ungroup()
print(religion_by_rejection)
## # A tibble: 6 × 4
## party_reject religion_3cat n pct
## <chr> <chr> <int> <dbl>
## 1 Never BJP Hindu 150 64.9
## 2 Never BJP Muslim 47 20.3
## 3 Never BJP Others 34 14.7
## 4 Never INC Hindu 110 70.1
## 5 Never INC Muslim 12 7.6
## 6 Never INC Others 35 22.3
religion_by_vote <- WVS_India %>%
mutate(
religion_3cat = case_when(
`V185G: Religious denomination -Main group` == 6 ~ "Hindu",
`V185G: Religious denomination -Main group` == 5 ~ "Muslim",
TRUE ~ "Others"
)
) %>%
filter(
vote_choice %in% c("Vote BJP", "Vote INC"),
!is.na(`V185G: Religious denomination -Main group`)
) %>%
count(vote_choice, religion_3cat) %>%
group_by(vote_choice) %>%
mutate(pct = round(100 * n / sum(n), 1)) %>%
ungroup()
print(religion_by_vote)
## # A tibble: 6 × 4
## vote_choice religion_3cat n pct
## <chr> <chr> <int> <dbl>
## 1 Vote BJP Hindu 389 92
## 2 Vote BJP Muslim 2 0.5
## 3 Vote BJP Others 32 7.6
## 4 Vote INC Hindu 463 72.7
## 5 Vote INC Muslim 62 9.7
## 6 Vote INC Others 112 17.6