Project 1

Country: France

Topic: Trust and politics

Names:Вартаньян Александра,Свириденко Екатерина,Цацуев Савелий,Селезнев Илья.

Contributions: Вартаньян Александра - box plot (vote & age; petition & age), scatterplot, stacked bar plot, findings, conclusion Свириденко Екатерина - box plot, bar plot, research question, research interest Цацуев Савелий - how satisfied are French people with the national government, is there an association between time a person watches, reads or listens to news about politics and current affairs and their trust in legal system? Селезнев Илья - dataset, variables’ meaning and levels, central tendency measures, boxplot trust police and gender, boxplot cptppola, stflife

Research interest: In recent years, more and more protests started to take place in France as a sign of discontent and distrust of French citizens with the actions of politicians and the government. The political and civic situation, the level of civic engagement in the country attracts interest. Hooghe and Marien in their article touch upon the idea that “political trust will only have these behavioral consequences if it is associated with sufficiently high levels of political efficacy”(Hooghe & Marien, 2013). The idea has developed our research interest in the topic: in this project we explored characteristics of people, both personal and social, that we assume might influence political trust and participation of a person, as well as French citizens’ thoughts on their ability and confidence to participate and make an impact. More precisely, for example, Melo and Stockemer as the result of their research on political participation done in 3 countries(Germany, France, UK) found that “the relationship between age and various forms of political engagement is frequently not linear. While some forms of political involvement are strongest among the elderly (that is voting), other types are more pronounced among individuals between the ages of 34 and 65 (that is signing petitions) or the young (that is participation in demonstrations)”(Melo & Stockemer, 2012). In this project, we attempt to see if the results for our data will be similar.

References: Hooghe, M., & Marien, S. (2013). A COMPARATIVE ANALYSIS OF THE RELATION BETWEEN POLITICAL TRUST AND FORMS OF POLITICAL PARTICIPATION IN EUROPE. European Societies, 15(1), 131–152. https://doi.org/10.1080/14616696.2012.692807 Melo, D., & Stockemer, D. (2012). Age and political participation in Germany, France and the UK: A comparative analysis. Comparative European Politics, 12(1), 33–53. https://doi.org/10.1057/cep.2012.31

Research question:

How are citizens’ of France opinions on politics influence their political participation?

Loading data, running libraries.

library(readr) 
library(dplyr) 
library(haven)
library(knitr)
library(ggplot2)
library(kableExtra) 
library(foreign)
library(dplyr)
library(ggplot2)
library(psych)
library(xfun)
library(sjPlot)
library(rstatix)
library(FSA)
library(tidyverse)
library(car)
library(ggpubr)
library(lsr)
library(DescTools)
library(effects)
library(jtools)
library(ggstatsplot)
library(interplot)

Dataset, variables’ meanings and levels.

ESS = read_sav("ESS10-subset.sav")
ESS_pol=ESS%>%
  dplyr::select(stfgov, trstlgl, vote, agea, psppipla, actrolga, nwspol, cptppola, trstplc, gndr, stflife, sgnptit)%>%
  na.omit()

Label = c("`stfgov`", "`trstplc`", "`gndr`", "`trstlgl`", "`vote`", "`agea`", "`psppipla`", "`actrolga`", "`nwspol`", "`cptppola`", "`stflife`", "`sgnptit`")
Meaning = c("How satisfied with the national government", "Trust in the police", "Gender", "Trust in the legal system", "Voted last national election", "Age of respondent, calculated", "Political system allows people to have influence on politics", "Able to take active role in political group", "News about politics and current affairs, watching, reading or listening, in minutes", "Confident in own ability to participate in politics", "How satisfied with life as a whole", "Signed petition last 12 months")
Level_Of_Measurement <- c("Quasi-interval (as numeric)", "Quasi-interval (as numeric)", "Nominal", "Quasi-interval (as numeric)", "Binary",  "Interval", "Ordinal", "Ordinal", "Ratio", "Ordinal", "Quasi-interval (as numeric)", "Binary")
df <- data.frame(Label, Meaning, Level_Of_Measurement, stringsAsFactors = FALSE)

kable(df) %>% 
  kable_styling(bootstrap_options=c("bordered", "responsive","striped"), full_width = FALSE)
Label Meaning Level_Of_Measurement
stfgov How satisfied with the national government Quasi-interval (as numeric)
trstplc Trust in the police Quasi-interval (as numeric)
gndr Gender Nominal
trstlgl Trust in the legal system Quasi-interval (as numeric)
vote Voted last national election Binary
agea Age of respondent, calculated Interval
psppipla Political system allows people to have influence on politics Ordinal
actrolga Able to take active role in political group Ordinal
nwspol News about politics and current affairs, watching, reading or listening, in minutes Ratio
cptppola Confident in own ability to participate in politics Ordinal
stflife How satisfied with life as a whole Quasi-interval (as numeric)
sgnptit Signed petition last 12 months Binary

Caclulating Central Tendency Measures.

Mode <- function(x) {
  ux <- unique(x)
  ux[which.max(tabulate(match(x, ux)))]
}  
#1
ESS_pol$stfgov =  as.numeric(as.character(ESS_pol$stfgov))
v.stfgov <- c(mean(ESS_pol$stfgov), Mode(ESS_pol$stfgov), median(ESS_pol$stfgov))
names(v.stfgov) <- c("mean", "mode", "median")
#2
ESS_pol$trstlgl =  as.numeric(as.character(ESS_pol$trstlgl))
v.trstlgl <- c(mean(ESS_pol$trstlgl), Mode(ESS_pol$trstlgl), median(ESS_pol$trstlgl))
names(v.trstlgl) <- c("mean", "mode", "median")
#3
ESS_pol$agea = as.numeric(as.character(ESS_pol$agea))
v.agea <- c(mean(ESS_pol$agea), Mode(ESS_pol$agea), median(ESS_pol$agea))
names(v.agea) <- c("mean", "mode", "median")
#4
ESS_pol$nwspol = as.numeric(as.character(ESS_pol$nwspol))
v.nwspol <- c(mean(ESS_pol$nwspol), Mode(ESS_pol$nwspol), median(ESS_pol$nwspol))
names(v.nwspol) <- c("mean", "mode", "median")
#5
ESS_pol$trstplc = as.numeric(as.character(ESS_pol$trstplc))
v.trstplc <- c(mean(ESS_pol$trstplc), Mode(ESS_pol$trstplc), median(ESS_pol$trstplc))
names(v.trstplc) <- c("mean", "mode", "median")
#6
ESS_pol$stflife = as.numeric(as.character(ESS_pol$stflife))
v.stflife <- c(mean(ESS_pol$stflife), Mode(ESS_pol$stflife), median(ESS_pol$stflife))
names(v.stflife) <- c("mean", "mode", "median")

СTM =  data.frame(v.stfgov, v.trstlgl, v.agea, v.nwspol, v.trstplc, v.stflife, stringsAsFactors = FALSE)

kable(СTM) %>% 
  kable_styling(bootstrap_options=c("bordered", "responsive","striped"), full_width = FALSE)
v.stfgov v.trstlgl v.agea v.nwspol v.trstplc v.stflife
mean 4.723145 5.189369 49.49225 83.87929 6.351052 7.011074
mode 5.000000 5.000000 51.00000 60.00000 7.000000 8.000000
median 5.000000 5.000000 50.00000 60.00000 7.000000 7.000000

Graphs creating:

Q1: What are French people’s thoughts on their ability to take active role in political group?

ESS_pol = ESS_pol%>%
  filter(actrolga != 8 )%>%
  filter(actrolga!= 9 )%>% 
  filter(actrolga != 7 )

ESS_pol$actrolga<-factor(ESS_pol$actrolga,labels=c("Not at all able","A little able",
  "Quite able","Very able","Completely able"),ordered=F,exclude=NA)

ggplot(ESS_pol)+
  geom_bar(aes(actrolga),fill="#9FB6CD",alpha=0.7,colour='#8B8386')+
  labs(title= "Citizens of France on their ability to take 
  active role in political group
",x= "Able to take active role in political group", y="Number of poeple")+
  theme(plot.title=element_text(face="bold",size=20, vjust=0.5,colour='#8B8386',hjust = 0.5),
        panel.background = element_rect(fill='white'),
        panel.grid.minor = element_line(colour='#8B8386'),
        axis.title.x = element_text(color="#8B8386",size= 15),
        axis.text.x = element_text(color="black",size = 12),
        axis.title.y = element_text(color="#8B8386",size= 15))

Conclusion 1: Citizens of France mostly believe they are not able to take active role in political group

Q2: How satisfied are French people with the national government?

ggplot()+
  geom_histogram(data = ESS_pol, aes(x = stfgov), binwidth = 1, fill="#EEDC82", col="lightgoldenrod4", alpha = 0.5) +
  xlim(c(0, 10)) +
  xlab("Satisfaction with the national government") + 
  ylab("Number of people") +
  geom_vline(aes(xintercept = mean(ESS_pol$stfgov), color = 'mean'), linetype="solid", size=1) +
  geom_vline(aes(xintercept = median(ESS_pol$stfgov), color = 'median'), linetype="solid", size=1)+
  geom_vline(aes(xintercept = Mode(ESS_pol$stfgov), color = 'mode'), linetype="longdash",size=1) +
  scale_color_manual(name = "Measurement", values = c(median = "#9A32CD", mean = "#CD1076", mode = "white"))+
  ggtitle("How satisfied are French people with the national government ")

Conclusion 2: We can see that satisfaction with the national government is distributed almost normally as we see an almost bell-shaped graph: the majority of answers are from 4 to 7, and 0, 1, 9 and 10 are actually very rare answers.

Q3: How likely are people to vote in the last election if they are confident that the political system allows people to influence policy?

ESS_pol=ESS_pol%>%
  filter( cptppola != 8 )%>%
  filter(cptppola!= 9 )%>% 
  filter(cptppola != 7 )

ESS_pol$cptppola<-factor(ESS_pol$cptppola,labels=c("Not at all confident","A little confident",
"Quite confident","Very confident","Completely confident"),ordered=F,exclude=NA)

ggplot(ESS_pol)+
  geom_boxplot(aes(agea,cptppola,fill=cptppola),alpha=0.5,color="#8B8386")+
  xlim(10,100)+
  labs(title="Comparing levels of confidence in own ability 
       to participate in politics due to the age",
       y="Confident in own ability to participate in politics",
      x="Age")+
      theme(plot.title=element_text(face="bold",size=15, ,vjust=0.5,colour='#8B8386',hjust = 0.1),
             axis.title.x = element_text(color="black",size= 12),
            axis.title.y = element_text(color="black",size= 12),
             axis.text.y = element_text(color="#8B8386",size = 10),
            legend.position=('none'))

Conclusion 3: As it is presented on the graph, there is no drastic difference in terms of age between different levels of one’s confidence in their own ability to participate in politics. We can see that older people have less confidence here.

Q4: Is there an relationship between time citizens watch, read or listen to news about politics and current affairs and their trust in legal system?

ggplot(ESS_pol)+
  geom_point(aes(x=nwspol,y=trstlgl))+scale_x_continuous(limits=c(0,1500))+
  scale_y_continuous(limits=c(0,10),breaks=c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10))+
  xlab("Trust in the legal system") +
  ylab("News about politics") +
  ggtitle("Relationship between citizen's trust in the legal system 
and the amount of time they watch, read or listen to news about politics") +
  theme_bw()

Conclusion 4: In Pearson’s correlation if the value is 1, there is a positive linear correlation, if the value is -1, there is a negative linear correlation, and the nearer to the 0, the lower is correlation. Our correlation value is very near to zero, so we can conclude that there is no correlation between news about politics consumed and trust in the legal system among French citizens.

Q5: Is there a difference in relation to trust in the police depending on gender?

ESS_pol = ESS_pol %>%
  filter(trstplc != 77 )%>%
  filter(trstplc != 88 )%>% 
  filter(trstplc != 99 )

ESS_pol$gndr <- factor(ESS_pol$gndr, labels = c("Male", "Female"),ordered= F,exclude = NA)
ggplot() +
  geom_boxplot(data = ESS_pol, aes(x = gndr, y = trstplc), fill="lightgoldenrod2", col="lightgoldenrod4", alpha = 0.5) +
  ylim(c(1,10)) +
  xlab("Gender") + 
  ylab("Trust in the police") +
  ggtitle("Relationship between gender and trust in the police")

Conclusion 5: As we found in France, both men and women have the same level of trust in police officers, the median of which is 7

Q6: Are people who fill confidence to say the political system in [country] allows people like you to have a say in what the government does more satisfied with life?

ESS_pol = ESS_pol %>%
  filter(cptppola != 7 )%>%
  filter(cptppola != 8 )%>% 
  filter(cptppola != 9 )
ESS_pol = ESS_pol %>%
  filter(stflife != 77 )%>%
  filter(stflife != 88 )%>% 
  filter(stflife != 99 )

ESS_pol$cptppola <- factor(ESS_pol$cptppola, labels = c("Not at all confident", "A little confident", "Quite confident", "Very confident", "    Completely confident"),ordered= F)
ggplot() +
  geom_boxplot(data = ESS_pol, aes(x = cptppola, y = stflife), fill="#FA8072", col="#8B4C39", alpha = 0.5) +
  ylim(c(1,10)) +
  xlab("Confident in own ability to participate in politics") + 
  ylab("How satisfied with life as a whole") +
  ggtitle("Confidence in ability to participate in politics and satisfaction with life as a whole")

Conclusion 6: It can be argued that there is a relationship between the confidence that the political system in a country allows people to influence what the government does and the level of life satisfaction, because the higher the level of confidence, the higher the level of satisfaction.

Q7: How likely are people to vote in the last election if they are confident that the political system allows people to influence polictics?

ESS_pol = ESS_pol %>%
  filter(psppipla != 7) %>%
  filter(psppipla != 8) %>%
  filter(psppipla != 9)

ESS_pol$psppipla <- factor(ESS_pol$psppipla, labels = c("Not at all", 
"Very little", "Some","A lot", "A great deal"), ordered = F)

ESS_pol = ESS_pol %>%
  filter(vote !=3) %>%
  filter(vote !=7) %>%
  filter(vote !=8) %>%
  filter(vote !=9)

ESS_pol$vote <- factor(ESS_pol$vote, labels = c("Yes", "No"), ordered = F)

ggplot(data=ESS_pol, aes(x=psppipla, fill = vote)) +
  geom_bar(position = "fill") +
  scale_fill_manual(values=c("#CD6090", "#009ACD", "#808080")) +
  coord_flip() +
  xlab("Confidence of citizens to influence politics") +
  ylab("Share of population") +
  ggtitle("The relationship between voting in recent elections
and citizens' confidence in influencing politics") +
  theme(plot.title = element_text(face="bold",size = 15, color="#104E8B"),
        legend.title=element_text(face="bold",size = 18, color="#104E8B"),
        axis.title.x=element_text(face="bold", color = "black"),
        axis.title.y=element_text(face="bold", color = "black"),
        axis.text.y = element_text(size = 10))

Conclusion 7: From what we can see on this graph, it can be concluded that regardless of whether people believe that the political system allows people to influence politics or not, they still go to vote in elections.The only exception is the layer of people who said “a great deal” in believing that the political system allows people to influence politics ; Among them, about three-quarters (75%) not voted in the last elections.

Q8: Is there any association between the time a person watches, reads or listens to news about politics and their life satisfaction about national government?

ESS_pol$nwspol = as.numeric(as.character(ESS_pol$nwspol))
ESS_pol$stfgov  = as.numeric(as.character(ESS_pol$stfgov ))


ESS_pol = ESS_pol %>%
  filter(nwspol !=7777) %>%
  filter(nwspol !=8888) %>%
  filter(nwspol !=9999) 
  
ESS_pol = ESS_pol %>%
  filter(stfgov !=77) %>%
  filter(stfgov !=88) %>%
  filter(stfgov !=99) 


ggplot(data=ESS_pol) +
  geom_point(aes(x = nwspol, y = stfgov)) +
  scale_color_manual("#7B68EE", "#FFFF00") +
  xlab("How much time French citizens spends on politics news, in minutes") +
  ylab("Level of satisfaction with national government") +
  ggtitle("The level of satisfaction with national government due to time spend
on politics news") +
  scale_x_continuous(limits=c(0, 1200)) +
  scale_y_continuous(limits=c(0,10),breaks=c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) +
  theme_bw()

Conclusion 8: As we can see from the plot, correlation is nearer to zero, therefore there is no correlation between people’s time spending on politics news and their level of satisfaction with government

Q9: Is there any differences between people’s age and there participation in signing petition?

ESS_pol = ESS_pol %>%
  filter(sgnptit !=77) %>%
  filter(sgnptit !=88) %>%
  filter(sgnptit !=99) 

ESS_pol = ESS_pol %>%
  filter(agea !=999) 

ESS_pol$agea = as.numeric(as.character(ESS_pol$agea))
ESS_pol$sgnptit = factor(ESS_pol$sgnptit, labels=c("Yes", "No"), 
                         ordered=F)

ggplot(ESS_pol) + 
  geom_boxplot(aes(agea, sgnptit, fill = sgnptit), alpha = 0.5) +
  scale_x_continuous(limits=c(10,100),breaks=c(10, 20, 30, 40, 50, 60, 70, 80, 
                                               90, 100)) +
  labs(title="Relationship between age and signing petitions", 
       y= "Signed petition last 12 months", x = "Age") +
  theme(plot.title = element_text(face="bold", size=15, vjust=0.5, hjust=0.1),
        axis.title.x = element_text(color="black", size=12),
        axis.title.y = element_text(color="black",size= 12),
        axis.text.y = element_text(size=10),
        axis.text.x = element_text(size=10),
        legend.position=("none"))

Conclusion 9: We can see that people from 30 to 50 years (middle-aged) signing petitions more than other aged groups.

Q10: Is there any differences between people’s age and their participation in voting last election?

ESS_pol = ESS_pol %>%
  filter(agea !=999) 

ESS_pol = ESS_pol %>%
  filter(vote !=3) %>%
  filter(vote !=7) %>%
  filter(vote !=8) %>%
  filter(vote !=9)

ESS_pol$agea = as.numeric(as.character(ESS_pol$agea))
ESS_pol$vote <- factor(ESS_pol$vote, labels = c("Yes", "No"), ordered = F)

ggplot(ESS_pol) +
  geom_boxplot(aes(agea, vote, fill = vote), alpha = 0.5) +
  scale_x_continuous(limits=c(10,100),breaks=c(10, 20, 30, 40, 50, 60, 70, 80, 
                                               90, 100)) +
  labs(title="Relationship between age and voting", x ="Age", y="Voting last election") +
  theme(plot.title = element_text(face="bold", size = 15, vjust = 0.5, hjust=0.1),
        axis.title.x = element_text(color="black", size=12),
        axis.title.y = element_text(color="black",size= 12),
        axis.text.y = element_text(size=10),
        axis.text.x = element_text(size=10),
        legend.position=("none"))

Conclusion 10: We can see from the plot that people from 60 to 70 (elder) vote more than other aged groups.

Summary of Findings:

There is a relationship between people’s age and theirs participation in voting and signing the petitions. We can see that elder people more participate in voting and vice versa middle-aged people more signing petitions. There is not a relationship between how much time people spend on politics news and their satisfaction on national government and trust in a legal system. There is not difference in relation to trust in the police and people’s gender. Citizens of France mostly believe they are not able to take active role in political group. People mostly answered from 4 to 7 about their satisfaction with national government. There is not significantly difference between people’s voting and their confidence that the political system allows people to influence on politics. But there is group that said “a great deal” and this group mostly did not vote.

Conclusion:

Thus, we have built all graphs and many results for us were a surprise. For example, we have supposed that time people spend on political news would influence on political participation and opinions about politics, but we have the opposite result. From research interesting we can see that we have proved second paper about age and political participation. In our graphs elder people more take part in politics as voting, middle-aged people more take part in politics as signing petitions. And in the second paper the results were the same. Therefore, we can conclude that demographic characteristics influence on people’s participation in France. We, also, can conclude that people’s opinion about different aspects of politics can influence on their participation in it. In the next parts of the project we will try to delve deeper into our results and tell more about them.

Project 2

Research question: How does confidence in abilities for political participation differ between various demographic groups of French citizens?

Research interest: The main interest of this research is to see how demographic factors like age and gender might influence confidence in one’s political participation and, consequently, participation itself. Our research interest in looking at age as one of the demographic characteristics is driven by Goerres’(2009) objective that people of 50 years of age and older in democratic regimes with the majority voting rule are and will be the dominating and most influential voting group and will basically dictate the electoral politics (Goerres, 2009). This information might seem outdated since the book was published in 2009, however, based on our research we can surprisingly see that Goerres’ point about elderly people having more influence as a voting group is still relevant. As another demographic characteristic to look at, we chose gender. This intention can be explained with the concept “gender gap”, the idea of “unequal relationship between men and women in politics”(Mayer, 2015). According to Mayer, “women are latecomers on the electoral scene, especially in France where they got the right to vote one century after men”(Mayer, 2015). The author implies that this is what explains lower levels of political interest, confidence and perception of own abilities in political participation for women compared to men. This objective pointed to our interest in testing the hypothesis about association between one’s gender and their opinion on abilities for political participation.

References: Goerres, A. (2009). Introduction: The political participation of older people in an era of demographic ageing. In Palgrave Macmillan UK eBooks (pp. 1–21). https://doi.org/10.1057/9780230233959_1 Mayer, N. (2015). The closing of the radical right gender gap in France? French Politics, 13(4), 391–414. https://doi.org/10.1057/fp.2015.18

Part I. Chi-squared Test

#Variables:gender and able to take active role in political group
ESS_ctest = ESS_pol%>%
  dplyr::select(gndr, actrolga) %>%
  filter(actrolga != 8)%>%
  filter(actrolga!= 9)%>% 
  filter(actrolga != 7)%>%
  filter(gndr!= 9)


ESS_ctest$actrolga<-factor(ESS_ctest$actrolga,labels=c("Not at all able","A little able",
  "Quite able","Very able","Completely able"),ordered=F,exclude=NA)
ESS_ctest$gndr<-factor(ESS_ctest$gndr,labels=c("Male","Female"),ordered = F, exclude = NA)

Checking for normality assumptions for running chi-square test:

There are many conditions, and they are all met, so we are all good to run the test: 1) data in cells is frequency and not percentage of something else 2) categories of variable are actually mutually exclusive 3) each subject contributed data only to one cell 4) study groups are independent 5) there are two nominal variables 6) the value of a cell expected is more than 5 in at least 80% of cases

Making hypotheses:

H0:There is no statistically significant association between citizens of France opinions on their ability to take active role in political group and their gender.

Ha:There is a statistically significant association between citizens of France opinions on their ability to take active role in political group and their gender.

Creating a contingency table.

chi_table<-table(ESS_ctest$actrolga, ESS_ctest$gndr)
kable(chi_table)%>% 
  kable_styling(bootstrap_options=c("bordered", "responsive", "striped"), full_width = FALSE)
Male Female
Not at all able 244 367
A little able 231 210
Quite able 183 144
Very able 53 35
Completely able 52 23

Visualizing the data.

plot_xtab(ESS_ctest$actrolga, ESS_ctest$gndr, margin = "row", bar.pos = "stack",
          show.summary = TRUE,summary.pos ="r")+
  scale_fill_manual(values=c("lightblue","pink"))+
  coord_flip()+
  xlab("Able to take active role in political group")+
  ylab("Share of population") +
  ggtitle("Citizens of France on their ability to take active role 
          in political group") +
  theme(plot.title = element_text(face="italic",size = 15, color="midnightblue"),
        axis.title.x=element_text(face="italic", color = "midnightblue"),
        axis.title.y=element_text(face="italic", color = "midnightblue"),
        axis.text.y = element_text(size = 10),
        legend.title = element_text(face="italic", size = 15))

Running the chi-square test.

chitest<-chisq.test(ESS_ctest$actrolga, ESS_ctest$gndr)

P-value is much smaller than 0.05, which means we can accept the alternative hypothesis that there actually is a statistically significant association between citizens of France opinions on their ability to take active role in political group and their gender.

Checking the expected and observed frequencies.

chisq.test(ESS_ctest$actrolga, ESS_ctest$gndr)$observed
##                   ESS_ctest$gndr
## ESS_ctest$actrolga Male Female
##    Not at all able  244    367
##    A little able    231    210
##    Quite able       183    144
##    Very able         53     35
##    Completely able   52     23
chisq.test(ESS_ctest$actrolga, ESS_ctest$gndr)$expected
##                   ESS_ctest$gndr
## ESS_ctest$actrolga      Male    Female
##    Not at all able 302.33009 308.66991
##    A little able   218.21206 222.78794
##    Quite able      161.80350 165.19650
##    Very able        43.54345  44.45655
##    Completely able  37.11089  37.88911

Analyzing standardized residuals.

kable(chisq.test(ESS_ctest$actrolga, ESS_ctest$gndr)$stdres)
Male Female
Not at all able -6.074251 6.074251
A little able 1.441395 -1.441395
Quite able 2.641178 -2.641178
Very able 2.076370 -2.076370
Completely able 3.525482 -3.525482

Looking at the residuals, we can say that most of them are quite large, the most contributing cells are “not at all able”“male”, “not at all able””female”(they are both +/- 5.8, which means that something super extremely unusual is happening), the second most contributing cells are “completely able” also both for males and females(they are +/-3.67, and here also is something extremely unusual).

Talking about what was expected according to the model and what was actually observed in each category:

Not at all able: Since we see such extreme numbers as +/-5.8(something from Twilight Zone), we can conclude that the observed values for individuals who perceive themselves as “Not at all able” to take active role in a political group differ significantly from the expected ones. Thus, we expected more males to perceive themselves as “not at all able”, and as for females, we less females to perceive themselves as such.

A little able, Quite able, Very able: Here the numbers are not so big and extreme, but still need our attention (ranging from approximately +/-1.48 to +/-2.46). This indicates that the observed values for these categories of perceived ability to take active role in a political group differ less from the expected ones in general.

Completely able: Here we also have large standardized residuals for both males and females (around +/-3.68). However, initially less males were expected to perceive themselves as “completely able” to take active role in a political group than actually observed, and for the females it is vice versa.

The association plot will help us better understand the situation with standardized residuals:

assocplot(table(ESS_ctest$actrolga, ESS_ctest$gndr), main="Association between gender and opinions on ability 
          to take active role in a political group",col=c("pink","lightblue"))

The graph visually proves our conclusions

Part II. The t-test

Variables: vote and age

ESS_ttest = ESS_pol %>%
  dplyr::select(agea, vote) %>%
  filter(agea !=999) %>%
  filter(vote != 3) %>%
  filter(vote != 7) %>%
  filter(vote != 8) %>%
  filter(vote != 9)

ESS_ttest$agea = as.numeric(as.character(ESS_ttest$agea))
ESS_ttest$vote <- factor(ESS_ttest$vote, labels = c("Yes", "No"), ordered = F)

Comparison mean values by boxplot:

ggplot() +
  geom_boxplot(data = ESS_ttest, aes(x = vote, y = agea), fill="#BF3EFF", col="#9A32CD", alpha = 0.5) +
  scale_y_continuous(limits = c(0,100)) +
  xlab("Voted last national election") + 
  ylab("Respondent age") +
  ggtitle("Participation in the election due to age") +
  theme(plot.title = element_text(face="bold", size = 15, vjust = 0.5, hjust=0.1),
        axis.title.x = element_text(color="black", size=12),
        axis.title.y = element_text(color="black",size= 12),
        axis.text.y = element_text(size=10),
        axis.text.x = element_text(size=10),
        legend.position=("none"))

Conclusion: The median age of respondents who voted last election (~58 y.o.) is higher than the median age of respondents who did not vote last election (~45 y.o.)

The lengths of two box plots are the same, therefore, we can say that variety of ages is the same in these two groups. Also we cannot see the outliers.

Check the normality of distribution:

describeBy(ESS_ttest, ESS_ttest$vote)
## 
##  Descriptive statistics by group 
## group: Yes
##      vars   n  mean    sd median trimmed   mad min max range  skew kurtosis  se
## agea    1 987 56.66 15.76     57   56.92 17.79  19  90    71 -0.13    -0.64 0.5
## vote    2 987  1.00  0.00      1    1.00  0.00   1   1     0   NaN      NaN 0.0
## ------------------------------------------------------------ 
## group: No
##      vars   n  mean    sd median trimmed   mad min max range skew kurtosis   se
## agea    1 555 46.73 15.87     45   45.78 16.31  16  90    74  0.5    -0.41 0.67
## vote    2 555  2.00  0.00      2    2.00  0.00   2   2     0  NaN      NaN 0.00

Skewness is a measure of the symmetry in a distribution and for normal distribution it must be zero (0). We can see in first group (who voted) that skew is -0.13 and we can say that as we have negative value for the skewness - it indicates first group that is skewed left. We can see in second group (who did not vote) that skew is 0.49 and we can say that we have positive value for skewness - it indicates second group that is skewed right

Kurtosis shows whether the distribution is peaked or plain. The kurtosis of the respondent’s age who voted equals to -0.63, and in the group who did not vote kurtosis equals to -0.45. We can say that two these groups has negative kurtosis.

However, our skew and kurtosis are quite within the limits for normality (s = -0.13/0.49 and k = -0.63/-0.45)

Therefore, we can say that skew and kurtosis indicates normal distribution.

Running Levene test for the equality of variances:

leveneTest(ESS_ttest$agea ~ ESS_ttest$vote,ESS_ttest)
## Levene's Test for Homogeneity of Variance (center = median)
##         Df F value Pr(>F)
## group    1   1e-04 0.9925
##       1540

As we can see, variances are homogeneous since p value is 0.9925 which is mich higher than 0.05.

Check the normality by histogram:

ggplot(ESS_ttest, aes(x = agea, fill = vote)) +
  geom_histogram(aes(y=..density..), position = "identity", alpha = 0.7, binwidth = 3) +
  geom_density(col = "#FF7F24", fill = "white", alpha = 0.1) +
  geom_vline(aes(xintercept = mean(ESS_ttest$agea), color = 'mean'), linetype="dashed", size=1) +
  geom_vline(aes(xintercept = median(ESS_ttest$agea), color = 'median'), linetype="longdash", size=1) +
  scale_color_manual(name = "Measurement", values = c(median = "#0000FF", mean = "#EE3B3B")) +
  xlab("Respondent's age") + 
  ylab("Density") +
  ggtitle("Respondent's Age distribution of voters and non-voters") +
  theme(plot.title = element_text(face="bold", size = 15, vjust = 0.5, hjust=0.1),
        axis.title.x = element_text(color="black", size=12),
        axis.title.y = element_text(color="black",size= 12),
        axis.text.y = element_text(size=10),
        axis.text.x = element_text(size=10))

We can see from histogram that these two group are not normally distributed. BUT group of respondents who voted is slightly closer to normal distribution, as it has more “territory” in a line.

Check the normality by QQ-plot: In France people can vote from 18 years old, therefore, in QQ-plot y will be limited by 18. Also, we need two create two groups: who vote and who do not vote.

vote_yes <- subset(ESS_ttest[ESS_ttest$vote == "Yes",]) 
vote_no <- subset(ESS_ttest[ESS_ttest$vote == "No",])
par(mfrow = c(1,2))
qqnorm(vote_yes$agea, ylim = c(18, 100), main = "Normal Q-Q Plot for voting"); qqline(vote_yes$agea,ylim = c(18 ,100), col= 2)
qqnorm(vote_no$agea, ylim = c(18 ,100), main = "Normal Q-Q Plot for non-voting"); qqline(vote_no$agea, col= 2, ylim = c(18 ,100))

We can see that two QQ-plots are not normally distributed because they have some values that are higher than our line. But we can say that first shows a slightly plainer speak.

Thus, we can conclude that the first group is slightly more normally distributed than second. BUT according to all our tests we can say that these two groups has abnormal distribution. Therefore, we need to use non-parametric test (not “normal” t-test). But by our task we need to do two t-tests.

We assume that age can influence on voting behavior from our second research (literature), therefore our hypothesis are: H0: the mean age of people who voted and did not vote does not differ. H1: the mean age does differ and, thus, there is a relation between age and voting behavior

To check our assumptions we need to conduct T-test:

t.test(ESS_ttest$agea ~ ESS_ttest$vote)
## 
##  Welch Two Sample t-test
## 
## data:  ESS_ttest$agea by ESS_ttest$vote
## t = 11.818, df = 1142, p-value < 2.2e-16
## alternative hypothesis: true difference in means between group Yes and group No is not equal to 0
## 95 percent confidence interval:
##   8.27725 11.57276
## sample estimates:
## mean in group Yes  mean in group No 
##          56.65653          46.73153

Statistical Conclusion: we have p-value < 2.2e-16, therefore, we can say that we can reject our null hypothesis.

Substantive conclusion: the mean age is significantly different among respondents who voted last election and who did not vote last election.

Since t-test has shown significant results, lets find cohens d:

cohen.d(ESS_ttest$agea, ESS_ttest$vote)
## Call: cohen.d(x = ESS_ttest$agea, group = ESS_ttest$vote)
## Cohen d statistic of difference between two means
##      lower effect upper
## [1,] -0.73  -0.63 -0.52
## 
## Multivariate (Mahalanobis) distance between groups
## [1] 0.63
## r equivalent of difference between two means
##  data 
## -0.29

We can see that the effect size is not so high that we can say that the differences between these two means is small.

To check results with non-parametric test: H0: the two populations (voters and non-voters) have the same distribution with the same median age. H1: the two populations (voters and non-voters) have a different distribution with a different median age.

wilcox.test(agea ~ vote, data = ESS_ttest)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  agea by vote
## W = 370896, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0

Statistical conclusion: p-value < 2.2e-16 that is why we need to reject null hypothesis. Substantive conclusion: The Wilcoxon test also proves that the age of people from the considered groups is significantly different among those who voted, and those who refused to vote.

Part III. ANOVA

#Variables:confident in own ability to participate in politics and age

ESS_anova = ESS_pol %>%
  dplyr::select(agea, cptppola) %>%
  filter(cptppola != 7) %>%
  filter(cptppola != 8) %>%
  filter(cptppola != 9)
ESS_anova$agea <- as.numeric(as.character(ESS_anova$agea)) 

ESS_anova$cptppola <- factor(ESS_anova$cptppola, labels = c("Not at all confident", 
"A little confident", "Quite confident","Very confident", "Completely confident"), ordered = F)
ggplot(ESS_anova)+
  geom_boxplot(aes(x=cptppola, y=agea, color=cptppola), alpha = 0.5)+
  xlab("Confidence in own ability to participate in politics") + 
  ylab("Age")+
  ggtitle("Comparing age of different levels of confidence in own ability to participate in politics")+
  labs(color= "level of confidence")

describeBy(ESS_anova$agea, ESS_anova$cptppola, mat = TRUE) %>% 
  dplyr::select(cptppola = group1, N=n, Mean=mean, SD=sd, Median=median, Min=min, Max=max, 
                Skew=skew, Kurtosis=kurtosis, st.error = se) %>% 
  kable(align=c("lrrrrrrrr"), digits=2, row.names = FALSE,
        caption="Age distribution by confidence in own ability to participate in politics") %>% 
  kable_styling(bootstrap_options=c("bordered", "responsive","striped"), full_width = FALSE)
Age distribution by confidence in own ability to participate in politics
cptppola N Mean SD Median Min Max Skew Kurtosis st.error
Not at all confident 392 55.74 17.05 56.0 20 90 -0.03 -0.90 0.86
A little confident 596 52.14 16.38 51.0 18 90 0.15 -0.82 0.67
Quite confident 429 52.27 16.42 53.0 16 90 0.08 -0.66 0.79
Very confident 79 51.49 14.86 51.0 22 78 -0.21 -0.81 1.67
Completely confident 46 53.07 14.71 51.5 22 80 -0.06 -0.80 2.17
#Groups are of a comparable size
leveneTest(ESS_anova$agea ~ ESS_anova$cptppola)
## Levene's Test for Homogeneity of Variance (center = median)
##         Df F value Pr(>F)
## group    4  1.5876 0.1751
##       1537

Variances are not unequal, as p-value is higher than 0.05,so we will perform ANOVA for equal variances.

ggplot(ESS_anova, aes(x=agea, fill = "agea"))+
  geom_histogram()+
  xlab("age")

ggqqplot(ESS_anova$agea)

shapiro_test(ESS_anova$agea) 
## # A tibble: 1 × 3
##   variable       statistic  p.value
##   <chr>              <dbl>    <dbl>
## 1 ESS_anova$agea     0.985 1.52e-11
ggqqplot(ESS_anova, "agea", facet.by = "cptppola")

From the histogram, qq plot and shapiro-wilch test we can see, that the age distribution is not normal in total, and also for concrete groups.

Hypothesis: H0 The 5 groups are equal in terms of age H1 At least one group is different from the other 4 groups in terms of age.

oneway.test(agea ~ cptppola, data = ESS_anova, var.equal = T) 
## 
##  One-way analysis of means
## 
## data:  agea and cptppola
## F = 3.498, num df = 4, denom df = 1537, p-value = 0.007497

There is a significant difference between some of the groups, as p-value is lower than 0.05, and we reject null hypothesis.

model<-lm(agea ~ cptppola, data = ESS_anova)
model
## 
## Call:
## lm(formula = agea ~ cptppola, data = ESS_anova)
## 
## Coefficients:
##                  (Intercept)    cptppolaA little confident  
##                       55.740                        -3.601  
##      cptppolaQuite confident        cptppolaVery confident  
##                       -3.474                        -4.246  
## cptppolaCompletely confident  
##                       -2.675
shapiro_test(residuals(model))
## # A tibble: 1 × 3
##   variable         statistic  p.value
##   <chr>                <dbl>    <dbl>
## 1 residuals(model)     0.986 5.99e-11
ggqqplot(residuals(model)) 

However, after performing Shapiro test for residual, we see that they are no distributed normally, so results of oneway.test are not representative and we need to use non-parametric test-Kruskal- Wallis ANOVA test.

Hypothesis: H0 The 5 groups are equal in terms of age H1 At least one group is different from the other 4 groups in terms of age.

kruskal.test(agea ~ cptppola, data = ESS_anova)
## 
##  Kruskal-Wallis rank sum test
## 
## data:  agea by cptppola
## Kruskal-Wallis chi-squared = 12.891, df = 4, p-value = 0.01182

P-value is less than the significance level 0.05, we can conclude that there is a significant difference in age between groups with different level of confidence in their ability to participate in politics, so we reject null hypothesis.

Post-hoc test for Kruskal-Wallis is a Dunn’s test. We will also use method of Bonferroni as we have 5 groups to lower the chance of getting random significant difference. Through the bonferroni correction our significance level is 0,05/10=0,005, where 10 is our total amount of pairs and 0,05 is previous significance level.

dunnTest(ESS_anova$agea ~ ESS_anova$cptppola,data = ESS_anova, method = "bonferroni") 
##                                     Comparison          Z      P.unadj
## 1    A little confident - Completely confident -0.4464973 0.6552380833
## 2    A little confident - Not at all confident -3.2952045 0.0009835008
## 3  Completely confident - Not at all confident -0.9365282 0.3490013091
## 4         A little confident - Quite confident -0.2073592 0.8357293656
## 5       Completely confident - Quite confident  0.3557736 0.7220101420
## 6       Not at all confident - Quite confident  2.8789630 0.0039898519
## 7          A little confident - Very confident  0.1423779 0.8867815018
## 8        Completely confident - Very confident  0.4603187 0.6452874962
## 9        Not at all confident - Very confident  1.8757945 0.0606835005
## 10            Quite confident - Very confident  0.2464781 0.8053121448
##          P.adj
## 1  1.000000000
## 2  0.009835008
## 3  1.000000000
## 4  1.000000000
## 5  1.000000000
## 6  0.039898519
## 7  1.000000000
## 8  1.000000000
## 9  0.606835005
## 10 1.000000000

p-value is in the last column

We can see that there is a significant difference in age between 2 groups: “A little confident- Not at all confident” and “Not at all confident - Quite confident”. The rest pairs of groups of people with different levels of political interest have not statistically significant differences in means.

kruskal_effsize(ESS_anova, agea ~ cptppola)
## # A tibble: 1 × 5
##   .y.       n effsize method  magnitude
## * <chr> <int>   <dbl> <chr>   <ord>    
## 1 agea   1542 0.00578 eta2[H] small

As for results of effect size, it is equal to 0.01431431 and magnitude is small which means that the difference between the variables is small.

We can see that there is a significant difference in age between 2 groups: “A little confident- Not at all confident” and “Not at all confident - Quite confident”. The rest pairs of groups of people with different levels of political interest have not statistically significant differences in means.

ggbetweenstats(ESS_anova, x=cptppola, y=agea,
               plot.type="box",
               type = "nonparametric")

This plot shows visually where we have the biggest difference and how some groups differ from others.

Overall conclusion:

Based on studying the data and conducting a series of tests, we came to the following conclusions:

  1. The opinions of French citizens about their ability to play an active role in a political group are quite closely related to gender. Among those who are not capable at all, there are many more women than men and vice versa.

  2. One of the important factors influencing voting behavior in France is age. Despite reaching the age of majority, young citizens practically do not attend elections, on the other hand, people over fifty for the most part regularly attend elections.

  3. Despite the fact that French citizens who are over fifty years old, for the most part, regularly attend elections and do so more often than younger citizens, their confidence in their own ability to participate in politics is less than that of younger ones.

To sum up, according to the results of our tests, our drawing reflects and once again confirms the judgments of the research interest.

Project 3

Research interest: In this project we aim to explore how trust in politicians and level of political inclusiveness allowed by government perceived by people are correlated with levels of satisfaction of French citizens with the national government. Firstly, trust in politicians is essential for the legitimacy of government and public satisfaction with its work. In France, this trust can be especially unstable, influenced by ongoing political changes and public perceptions of politicians’ credibility. Misheler and Rose in their study have shown that trust in political actors directly influences public perceptions of governmental efficacy, which is why we believe to be a significant component of our project interest(Mishler and Rose, 2011). Secondly, we believe perceptions of political inclusiveness, or the extent to which citizens feel they can influence government decisions, how included they feel in political decision-making, to be crucial for public satisfaction with national government. In France, active public involvement and protests are more common, which highlights the importance of understanding how these perceptions impact public satisfaction. When citizens perceive their political system as inclusive, allowing them to have a say in governmental decisions, their satisfaction with the government typically increases (Soroka and Wlezien, 2010). References: Mishler, W., & Rose, R. (2011). What are the origins of political trust?: Testing institutional and cultural theories in post-communist societies. Comparative Political Studies, 34(1), 30-62. Soroka, S., & Wlezien, C. (2010). Degrees of Democracy: Politics, Public Opinion, and Policy. Cambridge University Press.

Research question: How do trust in politicians, age and perceptions of political inclusiveness impact public satisfaction with the national government among French citizens?

Hypotheses: 1.Higher levels of trust in politicians are associated with greater satisfaction with the national government among French citizens. 2.Higher perceived political inclusiveness is associated with higher satisfaction with the national government among French citizens. 3.Higher age of respondent is associated with greater satisfaction with the national government among French citizens.

Justification of variables’ choice: Trust in Politicians (trstplt): this variable is critical as it reflects how reliable and trustworthy French politicians are, which reflects our outcome: how satisfied are people with national governance particularly in a French context where political trust can be unstable and change to a large extent. Perceived Political Inclusiveness (psppsgva): this varible estimates to what extent the political system incorporates public opinion of citizens into decision-making processes,basically how much they feel included and capable to have a say in politics, which we assume would as well impact public’s satisfaction with the national government

Preparing data for analysis:

We will use not only trust in politicians and age, but also trust in legal system and trust in policies as they can be similar to trust in politicians and can have more effect on satisfaction.

ESS3 = ESS %>% 
  dplyr::select(stfgov, trstplt, psppsgva, trstlgl, trstplc, agea)%>%
  na.omit()

ESS3 = ESS3 %>% 
  filter(stfgov != 77) %>% 
  filter(stfgov != 88) %>% 
  filter(stfgov != 99)

ESS3 = ESS3 %>%
  filter(trstplt != 77) %>%
  filter(trstplt != 88) %>%
  filter(trstplt != 99) 

ESS3 = ESS3 %>%
  filter(trstlgl != 77) %>%
  filter(trstlgl != 88) %>%
  filter(trstlgl != 99) 

ESS3 = ESS3 %>%
  filter(trstplc != 77) %>%
  filter(trstplc != 88) %>%
  filter(trstplc != 99) 

ESS3 = ESS3 %>%
  filter(agea != 999)

ESS3 = ESS3 %>%
  filter(psppsgva != 7) %>%
  filter(psppsgva != 8) %>%
  filter(psppsgva != 9) 

Manipulating & Describing variables:

Label3 <- c("`stfgov`", "`trstplt`", "`psppsgva`", "`trstlgl`", "`trstplc`", "`agea`") 
Meaning3 <- c("How satisfied with the national government", "Trust in politicians", "Political system allows people to have a say in what government does", "Trust in legal system", "Trust in policies", "Age")
Level_Of_Measurement3 <- c("Quasi-interval (as numeric)", "Quasi-interval (as numeric)", "Ordinal", "Quasi-interval (as numeric)", "Quasi-interval (as numeric)", "Inteval")
Measurement3 <- c("0 - 10", "0 - 10", "Not at all - Very little - Some - A lot - A great deal", "0 - 10", "0 - 10", "16-90")
df3 <- data.frame(Label3, Meaning3, Level_Of_Measurement3, Measurement3, stringsAsFactors = FALSE)
kable(df3) %>% 
  kable_styling(bootstrap_options=c("bordered", "responsive","striped"), full_width = FALSE)
Label3 Meaning3 Level_Of_Measurement3 Measurement3
stfgov How satisfied with the national government Quasi-interval (as numeric) 0 - 10
trstplt Trust in politicians Quasi-interval (as numeric) 0 - 10
psppsgva Political system allows people to have a say in what government does Ordinal Not at all - Very little - Some - A lot - A great deal
trstlgl Trust in legal system Quasi-interval (as numeric) 0 - 10
trstplc Trust in policies Quasi-interval (as numeric) 0 - 10
agea Age Inteval 16-90

Let’s recode all variables to correct type:

ESS3$stfgov <-  as.numeric(as.character(ESS3$stfgov))
ESS3$trstplt <-  as.numeric(as.character(ESS3$trstplt))
ESS3$trstplc <-  as.numeric(as.character(ESS3$trstplc))
ESS3$trstlgl <-  as.numeric(as.character(ESS3$trstlgl))
ESS3$agea <-  as.numeric(as.character(ESS3$agea))
ESS3$psppsgva <-  as.numeric(as.character(ESS3$psppsgva))

P.S Firstly, we recode psppsgva to numeric. We will speak about it later.

Descriptive statistics for numeric variables:

v.stfgov <- c(mean(ESS3$stfgov), Mode(ESS3$stfgov), median(ESS3$stfgov), sd(ESS3$stfgov), min(ESS3$stfgov), max(ESS3$stfgov))
names(v.stfgov) <- c("mean", "mode", "median", "sd", "min", "max")

v.trstplt <- c(mean(ESS3$trstplt), Mode(ESS3$trstplt), median(ESS3$trstplt), sd(ESS3$trstplt), min(ESS3$trstplt), max(ESS3$trstplt))
names(v.trstplt) <- c("mean", "mode", "median", "sd", "min", "max")

v.trstplc <- c(mean(ESS3$trstplc), Mode(ESS3$trstplc), median(ESS3$trstplc), sd(ESS3$trstplc), min(ESS3$trstplc), max(ESS3$trstplc))
names(v.trstplc) <- c("mean", "mode", "median", "sd", "min", "max")

v.trstlgl <- c(mean(ESS3$trstlgl), Mode(ESS3$trstlgl), median(ESS3$trstlgl), sd(ESS3$trstlgl), min(ESS3$trstlgl), max(ESS3$trstlgl))
names(v.trstlgl) <- c("mean", "mode", "median", "sd", "min", "max")

v.agea <- c(mean(ESS3$agea), Mode(ESS3$agea), median(ESS3$agea), sd(ESS3$agea), min(ESS3$agea), max(ESS3$agea))
names(v.agea) <- c("mean", "mode", "median", "sd", "min", "max")

tendencymeasures_overview_num =  data.frame(v.stfgov, v.trstplt, v.trstplc, v.trstlgl, v.agea, stringsAsFactors = FALSE)

kable(tendencymeasures_overview_num) %>% 
  kable_styling(bootstrap_options=c("bordered", "responsive","striped"), full_width = FALSE)
v.stfgov v.trstplt v.trstplc v.trstlgl v.agea
mean 4.726108 3.884677 6.333155 5.195408 49.55793
mode 5.000000 5.000000 7.000000 5.000000 53.00000
median 5.000000 4.000000 7.000000 5.000000 50.00000
sd 2.292977 2.170004 2.151340 2.451068 18.50979
min 0.000000 0.000000 0.000000 0.000000 16.00000
max 10.000000 10.000000 10.000000 10.000000 90.00000

We can see that the highest mean (6,3) and median (7) is in trust in policies. As it quasi-interval there is minimum 0 in all variablea and maximum 10 in all variables. The mean age is 49, minimum - 16, maximum 90.

Descriptive statistics for categorical variable:

table(ESS3$psppsgva)
## 
##   1   2   3   4   5 
## 463 655 601 131  23

We can see that most people ответили, что Political system very little/some allows people to have a say in what government does (2nd & 3rd category) Interesting that only 23 French people out of 1883 said that Political system a great deal allows people to have a say in what government does (5th categpry) As it too small, we will connect it with category 4 (“A lot”) and recode variables to factor:

ESS3 = ESS3 %>%
  mutate(psppsgva = case_when(
    psppsgva %in% 4:5 ~ 4,
    TRUE ~ as.numeric(psppsgva)
  ))
ESS3$psppsgva <- factor(ESS3$psppsgva, labels = c("Not at all", "Very little", "Some", "A lot"), ordered = F)
table(ESS3$psppsgva) 
## 
##  Not at all Very little        Some       A lot 
##         463         655         601         154

Now we can see that we have 4 categories. Category “A lot” was mentioned by 154.

Now we will show our variables graphically.

For that we will need to create:

Box plot, to show the categorical variables.

Density plot(Histogram), to check if the distribution of our continuous variables is close to normal.

1.Boxplot:

ggplot(ESS3, aes(x = psppsgva,, y = stfgov)) +
  geom_boxplot() +
  labs(title = "Perceived Political Inclusiveness on satisfaction with government",
       x = "Perceived Political Inclusiveness",
       y = "Satisfaction with government")

Firstly, we can see one outlier who dissatisfied with national government and think that Political system a lot allows people to have a say in what government does. If people think that Political system a lot allows people to have a say in what government does than they have higher satisfaction with government.

2.Histograms:

ggplot(data = ESS3, aes(x = stfgov)) + geom_histogram(aes(y=..density..), position = "identity", alpha = 0.7, binwidth = 1, fill = "#00BFFF") + geom_density(col = "blue2", fill = "white", alpha = 0.1) + xlab("Satisfaction with government")

ggplot(data = ESS3, aes(x = trstplt)) + geom_histogram(aes(y=..density..), position = "identity", alpha = 0.7, binwidth = 1, fill = "skyblue1") + geom_density(col = "blue2", fill = "white", alpha = 0.1) + xlab("Trust in politicians")

ggplot(data = ESS3, aes(x = trstplc)) + geom_histogram(aes(y=..density..), position = "identity", alpha = 0.7, binwidth = 1, fill = "skyblue4") + geom_density(col = "blue2", fill = "white", alpha = 0.1) + xlab("Trust in policies")

ggplot(data = ESS3, aes(x = trstlgl)) + geom_histogram(aes(y=..density..), position = "identity", alpha = 0.7, binwidth = 1, fill = "skyblue3") + geom_density(col = "blue2", fill = "white", alpha = 0.1) + xlab("Trust in legal system")

ggplot(data = ESS3, aes(x = agea)) + geom_histogram(aes(y=..density..), position = "identity", alpha = 0.7, binwidth = 1, fill = "skyblue") + geom_density(col = "blue2", fill = "white", alpha = 0.1) + xlab("Age of respondents")

As it can be seen from the histograms, satisfaction with goverment is slightly close to normal distribution. But trust in politicians is slightly close to non normal distribution. Mostly people choose 5. Also, trust in policies is slightly close to non normal distribution. Mostly people choose 7. Also, trust in legal system is slightly close to non normal distribution. Mostly people choose 5. Also, age is slightly close to non normal distribution.

Let’s look at correlation coefficients: As we have non normal distributed data

ESS = ESS3 %>% 
  dplyr::select(trstplt,agea, stfgov, trstlgl, trstplc)
tab_corr(ESS, corr.method = "spearman")
  trstplt agea stfgov trstlgl trstplc
trstplt   0.001 0.517*** 0.491*** 0.418***
agea 0.001   0.053* -0.120*** 0.072**
stfgov 0.517*** 0.053*   0.398*** 0.355***
trstlgl 0.491*** -0.120*** 0.398***   0.532***
trstplc 0.418*** 0.072** 0.355*** 0.532***  
Computed correlation used spearman-method with listwise-deletion.

We can see that trust in politicians and satisfaction with goverment has positive direction. (0,517) And it is the biggest among other variables. Also, age and trust in politicians don’t have effect on each other. Therefore, we can work with them in models. There is a very high level of significance*** (p <. 001) in trust in politicians and satisfaction with goverment. And there is a normal level of significance* in age and satisfaction with goverment.

Hierarchically building models:

Lets first build model with a numeric quasi-interval predictor: trust in politicians.

first_var<-lm(stfgov~trstplt,ESS3)
summary(first_var)
## 
## Call:
## lm(formula = stfgov ~ trstplt, data = ESS3)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -8.1648 -1.3533  0.0844  1.2090  7.4583 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  2.54170    0.09202   27.62   <2e-16 ***
## trstplt      0.56231    0.02068   27.19   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.942 on 1871 degrees of freedom
## Multiple R-squared:  0.2832, Adjusted R-squared:  0.2828 
## F-statistic: 739.2 on 1 and 1871 DF,  p-value: < 2.2e-16

To this numeric predictor, lets add another categorical predictor political system allows people to have a say in what government does and another umeric predictor age.

Additive model: Outcome - stfgov - How satisfied with the national government Predictictors: trstplt - Trust in politicians psppsgva - Political system allows people to have a say in what government does agea - age of respondents Code:

ad_model<-lm(stfgov ~ trstplt + psppsgva + agea,data = ESS3)
summary(ad_model)
## 
## Call:
## lm(formula = stfgov ~ trstplt + psppsgva + agea, data = ESS3)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -7.8599 -1.2408  0.1128  1.2278  7.9230 
## 
## Coefficients:
##                     Estimate Std. Error t value Pr(>|t|)    
## (Intercept)         1.961956   0.161947  12.115  < 2e-16 ***
## trstplt             0.484195   0.022487  21.532  < 2e-16 ***
## psppsgvaVery little 0.512675   0.119499   4.290 1.88e-05 ***
## psppsgvaSome        0.835384   0.128887   6.482 1.16e-10 ***
## psppsgvaA lot       1.448319   0.187712   7.716 1.95e-14 ***
## agea                0.006392   0.002393   2.671  0.00763 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.906 on 1867 degrees of freedom
## Multiple R-squared:  0.3112, Adjusted R-squared:  0.3094 
## F-statistic: 168.7 on 5 and 1867 DF,  p-value: < 2.2e-16

Comparison of models

Lets now compare our models with one and with two predictors by anova.

anova(first_var, ad_model)
## Analysis of Variance Table
## 
## Model 1: stfgov ~ trstplt
## Model 2: stfgov ~ trstplt + psppsgva + agea
##   Res.Df    RSS Df Sum of Sq     F    Pr(>F)    
## 1   1871 7055.2                                 
## 2   1867 6779.4  4    275.82 18.99 2.548e-15 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

As we can see here, p-value is much less than 0.05, so we should look at the RSS value and consider a model with its least value as a better one.

Thus, in this case, a model with 3 predictors is much better.

tab_model(first_var,ad_model,
          dv.labels="Satisfaction with national government",
          pred.labels = c("Intercept","Trust in politicians","Very little perceived political inclusivness","Some perceived political inclusivness","A lotperceived political inclusivness", "Age of respondent"))
  Satisfaction with national government
Predictors Estimates CI p Estimates CI p
Intercept 2.54 2.36 – 2.72 <0.001 1.96 1.64 – 2.28 <0.001
Trust in politicians 0.56 0.52 – 0.60 <0.001 0.48 0.44 – 0.53 <0.001
Very little perceived political inclusivness 0.51 0.28 – 0.75 <0.001
Some perceived political inclusivness 0.84 0.58 – 1.09 <0.001
A lotperceived political inclusivness 1.45 1.08 – 1.82 <0.001
Age of respondent 0.01 0.00 – 0.01 0.008
Observations 1873 1873
R2 / R2 adjusted 0.283 / 0.283 0.311 / 0.309

P-value is significant here (p <.001) and in age it is 0.008 Adjusted R-squared = 0.309, which means that 30% of variation in satisfaction with national government can be explained with the model. And now we look at the estimates to be able to construct the equation that looks like this: Y=1,96+0,48trsplt+0,5Very little perceived political+ 0,83Some perceived political inclusivness+1,45A lot perceived political inclusivness+0,006*Age.

The intercept is equal to 1,96 and means low trust in politicians, not at all perceived political inclusivness, low age. With each increase in trust in politicians by one, satisfaction with national government rises by 0.48. With each increase of age by one, satisfaction with national goverment rises by 0.006 If a respondent consider the matter of a Very little perceived political inclusivness, satisfaction with national government increases by 0.5. If a respondent consider the matter of Some perceived political inclusivness, satisfaction with national government increases by 0.83. If a respondent consider the matter of A lot perceived political inclusivness, satisfaction with national government increases by 1.45.

Vizualization of models:

Let’s build vizualization to confirm our results

plot_model(ad_model, type = 'pred', term = 'trstplt')

We can see a positive relationship between satisfaction with government and trust to politicians

plot_model(ad_model, type = 'pred', term = 'psppsgva')

With the growth of political inclusiveness, satisfaction with government increases

plot_model(ad_model, type = 'pred', term = 'agea')

With the growth of respondents age, satisfaction with government increases

plot(allEffects(ad_model))

These plots show the same result but in one facet for better seeing.

Conclusion:

Summarizing our analysis, we can make several conclusions: 1)We answered our research question and our hypotheses were confirmed. 2)Perceptions of political inclusivity and trust in politicians influence public satisfaction with the national government among French citizens. 3)They also have a positive effect on satisfaction with government. 4) If we conclude our final model in simple terms, then French citizens who are older and trust politicians more and believe that they have higher political inclusion in their state are more satisfied with the national government. We have proven all this by looking at our variables in graphs, building models, and visualizing those models.

Project 4

Research interest: In addition to exploring the direct relationships between trust in politicians, perceptions of political inclusiveness, and satisfaction with the national government, we aim to investigate whether the relationship between trust in politicians and satisfaction with the national government is moderated by perceptions of political inclusiveness.

Hooghe & Marien (2013) in their study show that the impact of trust in politicians on governmental satisfaction may change based on the level of perceived political inclusiveness. For example, the authors found that political trust and perceptions of inclusiveness interact in shaping citizens’ attitudes towards government performance. When citizens feel included in the political process, their trust in politicians can lead to even higher levels of satisfaction with the government, as they perceive their trust to actually be influential (Hooghe & Marien, 2013).

Moreover, us controlling for age comes from the idea that age is a significant predictor of political attitudes and behaviors. Older individuals tend to have higher satisfaction with government due to more accumulated life experiences and historical contexts that shape their views. For instance, Strate et al. (1989) found that older people often show greater satisfaction with political institutions than younger ones.

References: Hooghe, M., & Marien, S. (2013). How to reach members of parliament? Citizens and modes of access to MPs in Western Europe. Parliamentary Affairs, 66(3), 563-585. Strate, J. M., Parrish, C. J., Elder, C. D., & Ford, C. (1989). Life Span Civic Development and Participation: Socialization of the Middle-aged Citizen. American Political Science Review, 83(1), 285-290.

Research question:How do trust in politicians, age and perceptions of political inclusiveness impact public satisfaction with the national government among French citizens, and how does the relationship between trust in politicians and satisfaction with the national government change with varying levels of perceived political inclusiveness?

Hypotheses: 1.Higher levels of trust in politicians are associated with greater satisfaction with the national government among French citizens. 2.Higher perceived political inclusiveness is associated with higher satisfaction with the national government among French citizens. 3.Higher age of respondent is associated with greater satisfaction with the national government among French citizens. 4.The positive effect of trust in politicians on governmental satisfaction will be stronger among those who perceive higher levels of political inclusiveness.

Justification of variables’ choice: 1.Trust in Politicians (trstplt): this variable is critical as it reflects how reliable and trustworthy French politicians are, which reflects our outcome: how satisfied are people with national governance particularly in a French context where political trust can be unstable and change to a large extent. 2.Perceived Political Inclusiveness (psppsgva): this varible estimates to what extent the political system incorporates public opinion of citizens into decision-making processes,basically how much they feel included and capable to have a say in politics, which we assume would as well impact public’s satisfaction with the national government 3. Age(agea): this is the control variable that we chose in order to see th impacts of other variables on the outcome more accurately

Interaction model

Let’s build an interaction model

int_model<-lm(stfgov ~ agea + trstplt + psppsgva + trstplt*psppsgva,data = ESS3)
summary(int_model)
## 
## Call:
## lm(formula = stfgov ~ agea + trstplt + psppsgva + trstplt * psppsgva, 
##     data = ESS3)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -7.6489 -1.2378  0.0819  1.2024  8.1212 
## 
## Coefficients:
##                              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                  1.761769   0.185585   9.493  < 2e-16 ***
## agea                         0.006500   0.002393   2.716  0.00667 ** 
## trstplt                      0.562244   0.041925  13.411  < 2e-16 ***
## psppsgvaVery little          0.837417   0.212142   3.947 8.19e-05 ***
## psppsgvaSome                 1.156733   0.257068   4.500 7.22e-06 ***
## psppsgvaA lot                1.824875   0.444374   4.107 4.19e-05 ***
## trstplt:psppsgvaVery little -0.112528   0.056664  -1.986  0.04719 *  
## trstplt:psppsgvaSome        -0.104690   0.059878  -1.748  0.08056 .  
## trstplt:psppsgvaA lot       -0.112808   0.086136  -1.310  0.19048    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.905 on 1864 degrees of freedom
## Multiple R-squared:  0.313,  Adjusted R-squared:  0.3101 
## F-statistic: 106.2 on 8 and 1864 DF,  p-value: < 2.2e-16

Let’s interpet the results step-by-step:

*Intercept Coefficient:1.761769 This is the expected value of stfgov when all predictors are at their reference levels. p-value<0.05 (highly significant)

*Age (agea) Coefficient: 0.007 For each additional year in age, satisfaction with the national government increases by 0.007 units.This effect is statistically significant (p <0.05), indicating a small but positive relationship between age and government satisfaction. This supports the hypothesis that higher age is associated with greater satisfaction with the national government among French citizens.

*Trust in Politicians (trstplt) Coefficient: 0.562 As trust in politicians increases by one unit, satisfaction with the national government increases by 0.562 units.This relationship is highly significant (p < 0.05). This supports the hypothesis that higher trust in politicians is associated with greater government satisfaction.

*Perceptions of Political Inclusiveness (psppsgva) Perceptions of political inclusiveness have different levels with “Not at all” as the reference category: -Very little: Coefficient: 0.837 When citizens perceive very little political inclusiveness, their satisfaction with the national government increases by 0.837 units compared to those who don’t perceive any inclusiveness at all. This effect is statistically significant (p < 0.05). -Some: Coefficient: 1.157 When citizens perceive some political inclusiveness, their satisfaction with the national government increases by 1.157 units compared to those who who don’t perceive any inclusiveness at all. Statistical Significance: This effect is statistically significant (p < 0.05).

-A lot: Coefficient: 1.825 When citizens perceive a great deal of political inclusiveness, their satisfaction with the national government increases by 1.825 units compared to those who don’t perceive any inclusiveness at all. This effect is statistically significant (p < 0.05).

Interaction Effects:

*Trust in politicians:Very little Coefficient: -0.113 This interaction term suggests that for those perceiving very little political inclusiveness, each unit increase in trust in politicians slightly reduces satisfaction with the national government by 0.113 units. This effect is significant (p <0.05).

*Trustin politicians:Some: Coefficient: -0.105 For those perceiving some political inclusiveness, each unit increase in trust in politicians reduces satisfaction with the national government by 0.105 units. This effect is not significant (p>0.05).

*Trust in politicians:A lot: Coefficient: -0.113 For those perceiving a lot of political inclusiveness, each unit increase in trust in politicians reduces satisfaction with the national government by 0.113 units. This effect is not significant (p >0.05).

Generally, the adjusted R-squared is 0.3101, indicating a good fit for sociological field, adjusting for the number of predictors in the model. The adjusted R-squared for our additive model was 0.3094, which means that our interaction model’s model fit is not much better, just by 0.07%.

Visualizatoin

Let’s visualise our results:

interplot(m = int_model, var1 = "psppsgva", var2 = "trstplt") +
  labs(title = "Interaction Plot of Trust in Politicians and Perceived Political Inclusiveness",
       x = "Estimated Coefficient of Trust in Politicians",
       y = "Perceived Political Inclusiveness") +
  theme_minimal()+
  geom_hline(yintercept = 0, linetype = "dashed")

Interpretation of the plot: The x-axis represents the perceived political inclusiveness, which ranges from very little to a lot. The y-axis represents the estimated coefficient of trust in politicians. The steeper the positive slope, the stronger the positive relationship between the two variables. Conversely, the steeper the negative slope, the stronger the negative relationship. In this case, the slope for those who perceive very little political inclusiveness is positive but shallow. This suggests that as trust in politicians increases, there is a small increase in the perceived political inclusiveness. The slope gets steeper as perceived political inclusiveness increases. This suggests that for people who perceive some or a lot of political inclusiveness, there is a stronger positive relationship between trust in politicians and perceived political inclusiveness. In other words, people who trust politicians more are also more likely to perceive a lot of political inclusiveness.

Comparison of models

Let’s compare additive and interaction models by ANOVA

anova(ad_model, int_model)
## Analysis of Variance Table
## 
## Model 1: stfgov ~ trstplt + psppsgva + agea
## Model 2: stfgov ~ agea + trstplt + psppsgva + trstplt * psppsgva
##   Res.Df    RSS Df Sum of Sq     F Pr(>F)
## 1   1867 6779.4                          
## 2   1864 6761.7  3    17.717 1.628 0.1809

We can see that the RSS of the additive model (6779.4) is higher than RSS of the interaction model (6761.7), which means that the second model is better. However, we have the p-value >0.05 here, which means that adding the interaction terms between trstplt and psppsgva does not significantly improve the model’s fit. However, we have seen significance in one category when looking at the results of our regression model, that’s why we decided to still work with this variable

Let’s build a table to compare additive and interaction models

tab_model(ad_model,int_model,
          dv.labels="Satisfaction with national government",
          pred.labels = c("Intercept","Trust in politicians","Very little perceived political inclusivness","Some perceived political inclusivness","A lot perceived political inclusivness", "Age of respondent", "Trust in politicians: Very little perceived political inclusivness", "Trust in politicians: Some perceived political inclusivness", "Trust in politicians: A lot perceived political inclusivness"))
  Satisfaction with national government
Predictors Estimates CI p Estimates CI p
Intercept 1.96 1.64 – 2.28 <0.001 1.76 1.40 – 2.13 <0.001
Trust in politicians 0.48 0.44 – 0.53 <0.001 0.56 0.48 – 0.64 <0.001
Very little perceived political inclusivness 0.51 0.28 – 0.75 <0.001 0.84 0.42 – 1.25 <0.001
Some perceived political inclusivness 0.84 0.58 – 1.09 <0.001 1.16 0.65 – 1.66 <0.001
A lot perceived political inclusivness 1.45 1.08 – 1.82 <0.001 1.82 0.95 – 2.70 <0.001
Age of respondent 0.01 0.00 – 0.01 0.008 0.01 0.00 – 0.01 0.007
Trust in politicians: Very little perceived political inclusivness -0.11 -0.22 – -0.00 0.047
Trust in politicians: Some perceived political inclusivness -0.10 -0.22 – 0.01 0.081
Trust in politicians: A lot perceived political inclusivness -0.11 -0.28 – 0.06 0.190
Observations 1873 1873
R2 / R2 adjusted 0.311 / 0.309 0.313 / 0.310

Conclusions and findings:

1)Confirmation of hypotheses:

1.Higher levels of trust in politicians are associated with greater satisfaction with the national government among French citizens. Confirmed: The coefficient for trust in politicians (0.562, p <0.05) indicates a significant positive relationship between trust in politicians and satisfaction with the national government.

2.Higher perceived political inclusiveness is associated with higher satisfaction with the national government among French citizens. Confirmed: The coefficients for perceived political inclusiveness (“Very little”: 0.837, “Some”: 1.157, “A lot”: 1.825, all p <0.05) show that higher perceived inclusiveness is associated with significantly higher satisfaction.

3.Higher age of respondent is associated with greater satisfaction with the national government among French citizens. Confirmed: The coefficient for age (0.006, p <0.05) indicates a small but significant positive relationship between age and satisfaction with the national government.

4.The positive effect of trust in politicians on governmental satisfaction will be stronger among those who perceive higher levels of political inclusiveness. We can say that the hypothesis is partially supported but not fully confirmed. The positive effect of trust in politicians on governmental satisfaction is indeed weaker among those who perceive lower levels of political inclusiveness. For those who perceive higher levels of political inclusiveness, the positive effect of trust in politicians remains stronger and is not significantly diminished, like in the hypothesis. However, the interaction terms show that the weakening effect is significant for lower levels of political inclusiveness.

2)Findings:

Trust in politicians significantly increases satisfaction with the national government. Older respondents tend to be more satisfied with the national government. Higher perceived political inclusiveness leads to greater satisfaction with the national government. The positive impact of trust in politicians on satisfaction is slightly weaker for those who perceive lower levels of political inclusiveness. Overall, trust in politicians, age, and perceptions of political inclusiveness are important factors influencing satisfaction with the national government.