# 1a. Construct the data_MP dataset ---------------------------------------------data_MP <- EUPeopleIta %>%# Select the relevant variables (uso LERI_ita_or, non LERI) dplyr::select( DIG02_1:DIG02_8, DEM02, DEM02R, VOTEI02_ITA, DEM01, LERI_ita_or, POLINT, POLINF_1:POLINF_3 ) %>%# Convert variables to factors dplyr::mutate(across(c(DIG02_1:DIG02_8, DEM02R, VOTEI02_ITA, DEM01, LERI_ita_or, POLINT, POLINF_1:POLINF_3), haven::as_factor )) %>%# Order the 1–8 digital use frequency variables dplyr::mutate(across(c(DIG02_1:DIG02_8),~factor(.x,levels =c("Never", "Less often", "Several times a month","Several times a week", "Once a day","Several times a day", "Almost all the time"),ordered =TRUE) )) %>%# Create numeric versions dplyr::mutate(across(c(DIG02_1:DIG02_8), as.integer,.names ="{.col}_num" )) %>%# Rename variables dplyr::rename(YouTube_ = DIG02_1,WhatsApp_ = DIG02_2,TwitterX_ = DIG02_3,Instagram_ = DIG02_4,TikTok_ = DIG02_5,Facebook_ = DIG02_6,LinkedIn_ = DIG02_7,Telegram_ = DIG02_8,YouTube = DIG02_1_num,WhatsApp = DIG02_2_num,Twitter_X = DIG02_3_num,Instagram = DIG02_4_num,TikTok = DIG02_5_num,Facebook = DIG02_6_num,Linkedin = DIG02_7_num,Telegram = DIG02_8_num,Age = DEM02,Age_cat = DEM02R,Vote = VOTEI02_ITA,Sex = DEM01,Left_Right = LERI_ita_or,Pol_int = POLINT,Inf_disagr = POLINF_1,Inf_check = POLINF_2,Inf_confirm = POLINF_3 ) %>%# Recode VOTEI02_ITA levels → Other party / Did not vote dplyr::mutate(Vote = forcats::fct_recode( Vote,"Other party"="Noi Moderati","Other party"="Impegno Civico-Centro Democratico","Other party"="Italexit per l'Italia","Other party"="Unione Popolare","Other party"="Italia Sovrana e Popolare","Other party"="Vita","Other party"="Altro partito","Did not vote"="Non sono andato a votare","Did not vote"="Ho votato scheda bianca / scheda nulla" ) )# ---- vote recode# Code 20 ("Prefer not to answer") → NAdata_MP <- data_MP %>%mutate(Vote_num =as.integer(EUPeopleIta$VOTEI02_ITA),Vote =case_when( Vote_num ==20~NA_character_,TRUE~as.character(Vote) ),Vote =factor(Vote) ) %>%select(-Vote_num)# ---- RECODE LERI_ita_or # # original variable: 1-11 = scale 0-10, 12 = "Not placed", 13 = NAdata_MP <- data_MP %>%mutate(Left_Right_num =as.integer(EUPeopleIta$LERI_ita_or),Left_Right =case_when( Left_Right_num %in%1:11~as.character(Left_Right_num -1), Left_Right_num ==12~"Not placed", Left_Right_num ==13~NA_character_,TRUE~NA_character_ ),Left_Right =factor( Left_Right,levels =c(as.character(0:10), "Not placed"),ordered =FALSE ) ) %>%select(-Left_Right_num)
3 Define the USES_DATASET
Code
# 1b. Construct the data_USES dataset ------------------------------------data_USES <- EUPeopleNet %>% dplyr::select(dplyr::starts_with("dig03_"))platforms <-c("YouTube", "WhatsApp", "TwitterX", "Instagram","TikTok", "Facebook", "LinkedIn", "Telegram")platform_prefixes <-paste0("dig03_", 1:8, "_")purpose_labels <-c("friends", "family", "inf_socially", "sup_soc_causes","inf_pol", "sup_pol_causes", "connect_profess","promote_profess", "other")purpose_suffixes <-1:9# Compute binary indicators platform x scopeplatform_long <-list()for (p inseq_along(platforms)) { plat <- platforms[p] prefix <- platform_prefixes[p]for (i inseq_along(purpose_suffixes)) { pattern_i <-paste0("^", prefix, purpose_suffixes[i], "$") cols_i <-grep(pattern_i, names(data_USES), value =TRUE)if (length(cols_i) >0) { platform_long[[length(platform_long) +1]] <- data_USES %>%mutate(Platform = plat,Purpose = purpose_labels[i],Response =ifelse(rowSums(across(all_of(cols_i)), na.rm =TRUE) >0,"Yes", "No" ) ) %>% dplyr::select(Platform, Purpose, Response) } }}data_platform_use <- dplyr::bind_rows(platform_long)# Summary of "YES" answerssummary_platform_use <- data_platform_use %>% dplyr::filter(Response =="Yes") %>% dplyr::group_by(Platform, Purpose) %>% dplyr::summarise(n =n(), .groups ="drop") %>% dplyr::group_by(Platform) %>% dplyr::mutate(Percentage = n /sum(n) *100) %>% dplyr::ungroup() %>% dplyr::mutate(Purpose =factor(Purpose, levels = purpose_labels))# Graph per platform#| label: fig_social_media_use_by_purpose#| fig-width: 9#| fig-height: 6#| message: false#| warning: false# panels order as ES datasummary_platform_use_plot <- summary_platform_use %>% dplyr::mutate(Platform =factor( Platform,levels =c("Facebook", "Instagram", "LinkedIn", "Telegram","TikTok", "TwitterX", "WhatsApp", "YouTube") ) )ggplot(summary_platform_use_plot,aes(x = Purpose, y = Percentage)) +geom_col(fill ="darkorange", color ="white", width =0.75) +geom_text(aes(label =sprintf("%.1f%%", Percentage)),vjust =-0.25,size =2.2,color ="black" ) +facet_wrap(~ Platform, ncol =4) +labs(title ="Use of Social Media Platform by Purpose",subtitle ="Percentage of respondents using each platform for each purpose (Yes responses)",x ="Purpose of Use",y ="Percentage of Respondents" ) +scale_y_continuous(limits =c(0, 50), breaks =seq(0, 50, 10),expand =expansion(mult =c(0, 0.08)) ) +theme_minimal(base_size =11) +theme(plot.title =element_text(face ="bold", size =12),plot.subtitle =element_text(size =10),axis.title.x =element_text(size =10, margin =margin(t =7)),axis.title.y =element_text(size =10, margin =margin(r =7)),axis.text.x =element_text(angle =90, hjust =1, vjust =0.5, size =7 ),axis.text.y =element_text(size =7),strip.text =element_text(face ="bold", size =10),panel.grid.major.x =element_blank(),panel.grid.minor.x =element_blank(),panel.grid.minor.y =element_blank(),plot.margin =margin(t =9, r =9, b =9, l =9) )
4Set platform per purpose
Code
# 1c. ANY PLATFORM PER PURPOSE (Yes / No ) ---------------------data_any <- EUPeopleNet %>% dplyr::select(dplyr::starts_with("dig03_"))labels_use <-c("friends", "family", "inf_socially", "sup_soc_causes","inf_pol", "sup_pol_causes", "connect_profess","promote_profess", "other")purpose_suffixes <-1:9for (i inseq_along(labels_use)) { pattern_i <-paste0("_", purpose_suffixes[i], "$") cols_i <-grep(pattern_i, names(data_any), value =TRUE)if (length(cols_i) >0) { data_any[[labels_use[i]]] <-ifelse(rowSums(data_any[, cols_i], na.rm =TRUE) >0, 1, 0 ) } else {message("⚠️ No columns found for purpose: ", labels_use[i]) }}existing_labels <-intersect(labels_use, names(data_any))data_any <- data_any %>% dplyr::mutate( dplyr::across(all_of(existing_labels),~factor(.x, levels =c(0, 1), labels =c("No", "Yes")) ) )summary_uses <- data_any %>% tidyr::pivot_longer(cols =all_of(existing_labels),names_to ="Purpose", values_to ="Response" ) %>%count(Purpose, Response) %>%group_by(Purpose) %>%mutate(Percentage = n /sum(n) *100) %>%ungroup()ggplot(summary_uses, aes(x = Purpose, y = Percentage, fill = Response)) +geom_col(position ="dodge") +scale_fill_manual(values =c("grey70", "darkorange")) +labs(title ="Use of ANY Social Media Platform by Purpose",subtitle ="Percentages within each purpose (Yes vs No)",x ="Purpose",y ="Percentage of Respondents",fill ="Response" ) +theme_minimal(base_size =10) +theme(axis.text.x =element_text(angle =45, hjust =1),plot.title =element_text(face ="bold") )
Code
# 1c-bis. political and sociopolitical purposes indicators --------data_any <- data_any %>%mutate(# political use (any platform)PolInf_smed = inf_pol,# political causes (any platform)PolSup_smed = sup_pol_causes,# sociopolitical use:# (social info, social causes support, political information, political causes support)PolSocial_smed =ifelse( inf_socially =="Yes"| sup_soc_causes =="Yes"| inf_pol =="Yes"| sup_pol_causes =="Yes","Yes", "No" ),# political info & support (more strict definition)PolInfSup_smed =ifelse( inf_pol =="Yes"| sup_pol_causes =="Yes","Yes", "No" ) ) %>%mutate(across(c(PolInf_smed, PolSup_smed, PolSocial_smed, PolInfSup_smed),~factor(.x, levels =c("No", "Yes")) ) )###Tables#| label: tables_indicators#| message: false#| warning: falselibrary(dplyr)library(tidyr)library(knitr)# indicators selectionindicators_long <- data_any %>% dplyr::select(PolInf_smed, PolSup_smed, PolSocial_smed, PolInfSup_smed) %>% tidyr::pivot_longer(cols =everything(),names_to ="Indicator",values_to ="Value" ) %>% dplyr::group_by(Indicator, Value) %>% dplyr::summarise(n = dplyr::n(),pct =100* n /sum(n),.groups ="drop" )knitr::kable( indicators_long,digits =1,caption ="Distribution of political/socio-political use (ANY platform)")
Distribution of political/socio-political use (ANY platform)
Indicator
Value
n
pct
PolInfSup_smed
No
426
100
PolInfSup_smed
Yes
875
100
PolInf_smed
No
441
100
PolInf_smed
Yes
860
100
PolSocial_smed
No
274
100
PolSocial_smed
Yes
1027
100
PolSup_smed
No
607
100
PolSup_smed
Yes
694
100
Code
### crosstab purposes #| label: crosstab_PolInf_PolSup#| message: false#| warning: falsecrosstab_inf_sup <-table(Information = data_any$PolInf_smed,Support = data_any$PolSup_smed)# Converts in data.frame & adds row percentage crosstab_df <-as.data.frame.matrix(crosstab_inf_sup)crosstab_df$Row_Total <-rowSums(crosstab_df)# Counts tableknitr::kable( crosstab_df,caption ="Table: political information vs political causes support (counts)")
Table: political information vs political causes support (counts)
No
Yes
Row_Total
No
426
15
441
Yes
181
679
860
Code
# Row percentageprop_row <-prop.table(crosstab_inf_sup, margin =1) *100prop_row_df <-as.data.frame.matrix(round(prop_row, 1))knitr::kable( prop_row_df,caption ="Table: political information vs political causes support (row percentages)")
Table: political information vs political causes support (row percentages)
No
Yes
No
96.6
3.4
Yes
21.0
79.0
5Descriptive plots: platform use and purposes
Code
# 2. Descriptive graphs ======================================## 2.1a Use frequency per platform (DIG02) – countdata_long <- data_MP %>% tidyr::pivot_longer(cols = YouTube_:Telegram_,names_to ="Platform",values_to ="Frequency" )ggplot(data_long, aes(x = Frequency)) +geom_bar(fill ="darkorange") +geom_text(stat ="count",aes(label =after_stat(count)), # FIX: after_stat() instead of ..count..vjust =-0.5,size =2 ) +facet_wrap(~ Platform, scales ="free_y", ncol =4) +theme_minimal() +theme(axis.text.x =element_text(angle =90, hjust =1)) +labs(title ="Social Media Frequency Use (Counts)",x =NULL,y ="Count" ) +scale_y_continuous(expand =expansion(mult =c(0, 0.15)))
Code
## 2.1b Use frequency per platform (DIG02) – percentagesdata_long_pct <- data_long %>% dplyr::group_by(Platform, Frequency) %>% dplyr::summarise(n =n(), .groups ="drop") %>% dplyr::group_by(Platform) %>% dplyr::mutate(pct =100* n /sum(n)) %>% dplyr::ungroup()ggplot(data_long_pct, aes(x = Frequency, y = pct)) +geom_col(fill ="darkorange") +geom_text(aes(label =sprintf("%.1f%%", pct)),vjust =-0.3,size =2 ) +facet_wrap(~ Platform, scales ="free_y") +theme_minimal() +theme(axis.text.x =element_text(angle =90, hjust =1)) +labs(title ="Social Media Frequency Use (Percentages)",x =NULL,y ="Percentages" ) +scale_y_continuous(expand =expansion(mult =c(0, 0.15)))
Code
## 2.2 Platform use per purpose (from multiple choice var DIG03)# Count "YES" per platform × purposedata_long_uses <- data_platform_use %>% dplyr::filter(Response =="Yes") %>% dplyr::group_by(Platform, Purpose) %>% dplyr::summarise(n =n(), .groups ="drop")ggplot(data_long_uses, aes(x = Purpose, y = n)) +geom_col(fill ="darkorange") +geom_text(aes(label = n),vjust =-0.3,size =2 ) +facet_wrap(~ Platform, scales ="free_y") +theme_minimal() +theme(axis.text.x =element_text(angle =90, hjust =1)) +labs(title ="Uses of Social Media Platforms (Counts)",x =NULL,y ="Count" ) +scale_y_continuous(expand =expansion(mult =c(0, 0.15)))
## 2.3 Indicators: political and sociopolitical use per platform# define data_any from EUPeopleNet for safetydata_any <- EUPeopleNet %>% dplyr::select(dplyr::starts_with("dig03_"))labels_use <-c("friends", "family", "inf_socially", "sup_soc_causes","inf_pol", "sup_pol_causes", "connect_profess","promote_profess", "other")purpose_suffixes <-1:9for (i inseq_along(labels_use)) { pattern_i <-paste0("_", purpose_suffixes[i], "$") cols_i <-grep(pattern_i, names(data_any), value =TRUE)if (length(cols_i) >0) { data_any[[labels_use[i]]] <-ifelse(rowSums(data_any[, cols_i], na.rm =TRUE) >0, 1, 0 ) }}# indexesdata_any <- data_any %>%mutate(PolInf_smed =ifelse(inf_pol ==1, 1, 0),PolSup_smed =ifelse(sup_pol_causes ==1, 1, 0),PolInfSup_smed =ifelse(inf_pol ==1| sup_pol_causes ==1, 1, 0),PolSocial_smed =ifelse( inf_socially ==1| sup_soc_causes ==1| inf_pol ==1| sup_pol_causes ==1,1, 0 ) ) %>%mutate(across(c(PolInf_smed, PolSup_smed, PolSocial_smed, PolInfSup_smed),~factor(.x, levels =c(0, 1), labels =c("No", "Yes")) ) )# single graphsggplot(data_any, aes(x = PolInf_smed)) +geom_bar(fill ="darkgreen") +theme_minimal() +labs(title ="Use of Social Media to Inform Oneself Politically (Any Platform)",x =NULL,y ="Count" )
Code
ggplot(data_any, aes(x = PolSup_smed)) +geom_bar(fill ="darkgreen") +theme_minimal() +labs(title ="Use of Social Media to Support Political Causes (Any Platform)",x =NULL,y ="Count" )
Code
ggplot(data_any, aes(x = PolSocial_smed)) +geom_bar(fill ="darkgreen") +theme_minimal() +labs(title ="Use of Social Media for Social/Political Information or Support",x =NULL,y ="Count" )
Code
# Facet with all indicatorsdata_long_2 <- data_any %>% tidyr::pivot_longer(cols =c(PolInf_smed, PolSup_smed, PolSocial_smed, PolInfSup_smed),names_to ="Indicator",values_to ="Value" )ggplot(data_long_2, aes(x = Value)) +geom_bar(fill ="darkorange") +facet_wrap(~ Indicator, scales ="free_y") +theme_minimal() +theme(axis.text.x =element_text(angle =90, hjust =1)) +labs(title ="Political/Social Uses of Social Media (Any Platform)",x =NULL,y ="Count" )
5.2Sociopolitical variables descriptives
Code
## 2.4 sociopolitical descriptives (from data_MP)# ageggplot(data_MP, aes(x = Age)) +geom_histogram(binwidth =5, fill ="darkorange", color ="white") +theme_minimal() +labs(title ="Age",x ="How old are you?",y ="Count" ) +theme(axis.text.x =element_text(angle =90, hjust =1))
# Vote in general elections (2022) ggplot(data_MP %>%filter(!is.na(Vote)), aes(x = Vote)) +geom_bar(fill ="darkorange") +theme_minimal() +labs(title ="Vote in the Last National Elections (Italy)",x ="Which party did you vote for in the last national elections?",y ="Count" ) +theme(axis.text.x =element_text(angle =90, hjust =1))
# Information disagreement exposureggplot(data_MP, aes(x = Inf_disagr)) +geom_bar(fill ="darkorange") +theme_minimal() +labs(title ="Frequency of exposure to information you disagree with (online)",x ="How often do you read, watch or listen to something you disagree with?",y ="Count" ) +theme(axis.text.x =element_text(angle =90, hjust =1))
# 5.2 Bartlett’s Test of Sphericity (to test whether correlation matrix differs from identity matrix)psych::cortest.bartlett(cor_matrix, n =nrow(data_PCA1))
$chisq
[1] 2351.818
$p.value
[1] 0
$df
[1] 28
Code
# 5.3 Multicollinearity and Redundancy (check for variables where r > 0.9)round(cor_matrix, 2)
# 6. PCA Estimation and Visualization -----------------------------------# Here the 8 active variables are platforms,the 8 supplementary variables are: Age_cat, Vote, Sex, Left_Right, Pol_int, Inf_disagr, Inf_check, Inf_confirmPCA1_result <- FactoMineR::PCA( data_PCA1,quali.sup =1:8, graph =FALSE)
Warning in FactoMineR::PCA(data_PCA1, quali.sup = 1:8, graph = FALSE): Missing
values are imputed by the mean of the variable: you should use the imputePCA
function of the missMDA package
Code
# 6.1 Summary of eigenvalues, contributions, cos², etc.summary(PCA1_result)
# 6.1.1 Variables relation to Dim1 and Dim2PCA1_desc <- FactoMineR::dimdesc(PCA1_result, axes =1:2, proba =0.05)PCA1_desc$Dim.1
Link between the variable and the continuous variables (R-square)
=================================================================================
correlation p.value
Telegram 0.7107833 1.041739e-200
Twitter_X 0.7038717 3.480574e-195
TikTok 0.6946969 4.276470e-188
Linkedin 0.6925912 1.661726e-186
Instagram 0.6881031 3.654681e-183
YouTube 0.6006333 2.210095e-128
Facebook 0.4590983 8.225746e-69
WhatsApp 0.3890403 2.895111e-48
Link between the variable and the categorical variable (1-way anova)
=============================================
R2 p.value
Age_cat 0.16327212 6.198418e-48
Inf_check 0.06810038 6.392291e-19
Inf_disagr 0.06628292 2.200328e-18
Inf_confirm 0.05654758 1.564022e-15
Left_Right 0.02422511 1.796380e-05
Vote 0.02712709 9.909615e-05
Link between variable and the categories of the categorical variables
================================================================
Estimate p.value
Age_cat=18_24 0.8448049 6.314004e-11
Age_cat=35_44 0.4837189 3.139509e-10
Age_cat=25_34 0.5330018 1.714502e-09
Inf_check=Inf_check_Very often 0.8497859 1.457769e-08
Inf_disagr=Inf_disagr_Very often 0.8356138 7.353664e-08
Inf_disagr=Inf_disagr_Often 0.4127128 1.234073e-05
Inf_confirm=Inf_confirm_Very often 0.6980323 1.294134e-05
Inf_check=Inf_check_Often 0.3993228 1.547763e-04
Vote=Forza Italia 0.8322058 3.113801e-04
Inf_confirm=Inf_confirm_Often 0.3868089 1.154004e-03
Left_Right=Ext_right 0.3924648 1.316871e-03
Vote=Movimento 5 Stelle 0.2151232 9.891616e-03
Left_Right=Right 0.2026920 2.072619e-02
Sex=Non-binary 1.0454188 4.902130e-02
Left_Right=No_position -0.3202688 3.374237e-02
Age_cat=55_64 -0.5312895 1.150529e-02
Left_Right=Left -0.3648603 3.203779e-03
Vote=Partito Democratico -0.4564384 2.558011e-04
Inf_confirm=Inf_confirm_Rarely -0.4923457 4.336972e-06
Inf_disagr=Inf_disagr_Rarely -0.4953230 3.847349e-06
Inf_check=Inf_check_Rarely -0.5263152 5.858813e-07
Inf_disagr=Inf_disagr_Never -0.7667999 2.008965e-08
Inf_check=Inf_check_Never -0.7816178 1.656179e-08
Inf_confirm=Inf_confirm_Never -0.7632705 2.767379e-09
Age_cat=65_+ -1.1933958 8.630145e-35
Code
PCA1_desc$Dim.2
Link between the variable and the continuous variables (R-square)
=================================================================================
correlation p.value
WhatsApp 0.7139505 2.701010e-203
Facebook 0.5233166 2.280502e-92
Instagram 0.3090819 3.383618e-30
TikTok -0.1627844 3.519636e-09
Telegram -0.2013846 2.266075e-13
Linkedin -0.3077723 6.067580e-30
Twitter_X -0.4057790 9.692650e-53
Link between the variable and the categorical variable (1-way anova)
=============================================
R2 p.value
Sex 0.037135620 2.156569e-11
Age_cat 0.020498489 6.094449e-05
Vote 0.022809086 9.041707e-04
Left_Right 0.011570927 1.961848e-02
Inf_check 0.008981723 1.971118e-02
Link between variable and the categories of the categorical variables
================================================================
Estimate p.value
Sex=Female 0.3038516 2.406963e-12
Age_cat=45_54 0.1952296 3.438103e-03
Left_Right=Ext_left 0.2183157 2.284974e-02
Vote=Partito Democratico 0.1603081 3.239774e-02
Age_cat=55_64 0.1515135 3.474535e-02
Age_cat=18_24 -0.2195176 2.757226e-02
Vote=Did not vote -0.1609720 1.091000e-02
Left_Right=No_position -0.1506509 1.028280e-02
Inf_check=Inf_check_Very often -0.2023231 1.938446e-03
Age_cat=65_+ -0.1358246 1.922577e-03
Vote=Other party -0.3415773 1.809898e-03
Sex=Male -0.1192441 4.004205e-12
Code
# 6.2 Initial biplot – active variables (social media platforms’ use)p <- factoextra::fviz_pca_var( PCA1_result,col.var ="contrib",gradient.cols =c("#00AFBB", "#E7B800", "#FC4E07"),repel =TRUE)
Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
ℹ Please use `linewidth` instead.
ℹ The deprecated feature was likely used in the ggpubr package.
Please report the issue at <https://github.com/kassambara/ggpubr/issues>.
Warning: `aes_string()` was deprecated in ggplot2 3.0.0.
ℹ Please use tidy evaluation idioms with `aes()`.
ℹ See also `vignette("ggplot2-in-packages")` for more information.
ℹ The deprecated feature was likely used in the factoextra package.
Please report the issue at <https://github.com/kassambara/factoextra/issues>.
Code
p
9Centroids of Supplementary Qualitative Variables in the PCA of Social Media Platforms
Code
# 7. Categorical Supplementary Variables (Centroids) --------------------# Extract centroides of qualitative supplementary variablesget_sup_coords <-function(pca_result, variable_name, dims =2) {# 1) data extraction quali_sup_data <- pca_result$call$quali.supif ("quali.sup"%in%names(quali_sup_data)) { quali_sup_data <- quali_sup_data$quali.sup }# 2) check variablesif (!variable_name %in%names(quali_sup_data)) {stop(paste("Variable", variable_name, "not found among supplementary qualitative variables.")) }# 3) centroids (avg per category) bary <- pca_result$call$quali.sup$barycentre# Rows selection for variables categories var_categories <-levels(quali_sup_data[[variable_name]]) bary_var <- bary[rownames(bary) %in% var_categories, , drop =FALSE]if (nrow(bary_var) ==0) {stop(paste("No barycentres found for variable", variable_name)) }# 4) Avg and st.dev used in PCA means <- pca_result$call$centre sds <- pca_result$call$ecart.type# Centroides standardization bary_scaled <-sweep(bary_var, 2, means, "-") bary_scaled <-sweep(bary_scaled, 2, sds, "/")# 5) PCA axis projection loadings <- pca_result$var$coord projected <-as.matrix(bary_scaled) %*%as.matrix(loadings[, 1:dims])# 6) Output in data frame projected_df <-as.data.frame(projected)colnames(projected_df) <-paste0("Dim.", 1:dims) projected_df$Category <-rownames(projected_df) projected_df$Variable <- variable_namereturn(projected_df)}# Centroides coordinates per each supplementary variableage_coords <-get_sup_coords(PCA1_result, "Age_cat")vote_coords <-get_sup_coords(PCA1_result, "Vote")Pol_int_coords <-get_sup_coords(PCA1_result, "Pol_int")LRight_coords <-get_sup_coords(PCA1_result, "Left_Right")Sex_coords <-get_sup_coords(PCA1_result, "Sex")infdis_coords <-get_sup_coords(PCA1_result, "Inf_disagr")infcheck_coords <-get_sup_coords(PCA1_result, "Inf_check")infconf_coords <-get_sup_coords(PCA1_result, "Inf_confirm")# 7.1 Biplot with vote centroidsp +geom_point(data = vote_coords,aes(x = Dim.1, y = Dim.2),color ="darkblue", size =3, shape =20 ) + ggrepel::geom_text_repel(data = vote_coords,aes(x = Dim.1, y = Dim.2, label = Category),color ="darkblue",size =3.5 )
Code
# 7.2 Biplot with age centroidsp +geom_point(data = age_coords,aes(x = Dim.1, y = Dim.2),color ="darkblue", size =3, shape =20 ) + ggrepel::geom_text_repel(data = age_coords,aes(x = Dim.1, y = Dim.2, label = Category),color ="darkblue",size =3.5 )
Code
# 7.4 Biplot with political interest centroidsp +geom_point(data = Pol_int_coords,aes(x = Dim.1, y = Dim.2),color ="darkblue", size =3, shape =20 ) + ggrepel::geom_text_repel(data = Pol_int_coords,aes(x = Dim.1, y = Dim.2, label = Category),color ="darkblue",size =3.5 )
10Principal Component Analysis Including Numerical Supplementary Variables: Political and Social Uses of Social Media
Code
# 8. Numerical Supplementary Variables: Political/Social Uses of Social Media ----# New dataset for PCA with following variables: inf_socially, inf_pol, sup_soc_causes, sup_pol_causes data_PCA2 <- data_PCA1 %>% dplyr::bind_cols( data_any %>% dplyr::select(inf_socially, inf_pol, sup_soc_causes, sup_pol_causes) ) %>%# check numerical dplyr::mutate( dplyr::across(c(inf_socially, inf_pol, sup_soc_causes, sup_pol_causes),~as.numeric(.x) ) )# Checkstr(data_PCA2)
tibble [1,301 × 20] (S3: tbl_df/tbl/data.frame)
$ Age_cat : Factor w/ 7 levels "0_17","18_24",..: 5 3 5 5 2 2 6 3 5 3 ...
..- attr(*, "label")= chr "EDAD RECODE"
$ Vote : Factor w/ 10 levels "+Europa","Alleanza Verdi-Sinistra",..: 7 NA 5 2 10 5 5 6 10 9 ...
$ Sex : Factor w/ 3 levels "Male","Female",..: 1 2 2 1 2 1 2 2 2 1 ...
..- attr(*, "label")= chr "Which gender do you identify with?"
$ Left_Right : Factor w/ 6 levels "Ext_left","Left",..: 3 NA 3 2 NA 3 6 NA 3 3 ...
$ Pol_int : Factor w/ 4 levels "Very interested",..: 3 3 4 2 3 2 3 2 3 2 ...
..- attr(*, "label")= chr "How interested would you say you are in politics - are you...?"
$ Inf_disagr : Factor w/ 5 levels "Very often","Often",..: 5 3 5 2 5 5 4 3 3 3 ...
..- attr(*, "label")= chr "Read, watch or listen to something online you disagree with_When looking for new"
$ Inf_check : Factor w/ 5 levels "Very often","Often",..: 5 3 5 2 5 5 4 3 3 2 ...
..- attr(*, "label")= chr "Check a news source that’s different from what you normally read, watch or lis"
$ Inf_confirm : Factor w/ 5 levels "Very often","Often",..: 5 3 5 2 5 5 4 3 3 2 ...
..- attr(*, "label")= chr "Try to confirm information you find by searching online for another source_When"
$ YouTube : int [1:1301] NA 2 7 3 7 6 6 5 4 6 ...
$ WhatsApp : int [1:1301] NA 6 7 6 6 5 5 6 6 5 ...
$ Twitter_X : int [1:1301] NA NA NA 1 1 1 1 6 NA 6 ...
$ Instagram : int [1:1301] NA 6 7 5 7 5 4 5 3 2 ...
$ TikTok : int [1:1301] NA NA 7 1 7 1 1 6 NA 6 ...
$ Facebook : int [1:1301] NA 6 7 5 1 1 5 6 5 5 ...
$ Linkedin : int [1:1301] NA 6 NA 4 1 1 1 4 NA 1 ...
$ Telegram : int [1:1301] NA 5 NA 1 2 1 1 5 NA 7 ...
$ inf_socially : num [1:1301] 0 1 0 1 0 0 0 1 1 1 ...
$ inf_pol : num [1:1301] 0 1 0 0 0 0 0 1 1 0 ...
$ sup_soc_causes: num [1:1301] 0 1 0 0 0 0 0 1 0 1 ...
$ sup_pol_causes: num [1:1301] 0 1 0 0 0 0 0 1 0 0 ...
Code
# NEW PCA estimation#Active variables: the eight social media platforms #Supplementary qualitative variables: Age_cat, Vote, Sex, Left_Right, Pol_int, Inf_disagr, Inf_check, and Inf_confirm.#Supplementary quantitative variables: inf_socially, inf_pol, sup_soc_causes, and sup_pol_causes.PCA2_result <- FactoMineR::PCA( data_PCA2,quanti.sup =17:20, # supplementari numerichequali.sup =1:8, # supplementari qualitativegraph =FALSE)
Warning in FactoMineR::PCA(data_PCA2, quanti.sup = 17:20, quali.sup = 1:8, :
Missing values are imputed by the mean of the variable: you should use the
imputePCA function of the missMDA package
Code
# Biplot of active variables with numerical supplementary variablesfactoextra::fviz_pca_var( PCA2_result,col.var ="contrib",gradient.cols =c("#00AFBB", "#E7B800", "#FC4E07"),repel =TRUE)
11Factor Analysis of online and offline political participation
Code
# 9. Factor Analysis of online and offline political participation ----# 9.0 Dictionary: original items -> new variable names -> activities ----participation_dict <- tibble::tibble(var_bin =c(# --- ONLINE (13) ---"parton_1", "parton_2", "parton_3", "parton_4", "parton_5","parton_6", "parton_7", "parton_8", "parton_9", "parton_10","parton_11", "parton_12", "parton_13",# --- OFFLINE (13) ---"partoff_1", "partoff_2", "partoff_3", "partoff_4", "partoff_5","partoff_6", "partoff_7", "partoff_8", "partoff_9", "partoff_10","partoff_11", "partoff_12", "partoff_13" ),new_name =c(# --- ONLINE ---"pol_inf_on", # parton_1 – actively searched for political information online"liked_on", # parton_2 – liked/followed political content"shared_on", # parton_3 – shared/retweeted political content"posted_on", # parton_4 – posted own political content"discuss_on", # parton_5 – discussed politics online"comment_on", # parton_6 – commented on political content"profile_on", # parton_7 – changed profile picture/status for political reasons"vol_party_on", # parton_8 – volunteered online for party/candidate"donat_party_on", # parton_9 – donated money online to party/candidate"donat_NGO_on", # parton_10 – donated money online to NGO/association"vol_social_on", # parton_11 – volunteered online for NGO/association"contact_on", # parton_12 – contacted politician/official online"petition_on", # parton_13 – signed online petition# --- OFFLINE ---"pol_meet_off", # partoff_1 – attended political meeting/rally"strike_off", # partoff_2 – took part in strike"demonst_off", # partoff_3 – took part in demonstration/march"org_demonst_off", # partoff_4 – helped organise demonstration"discuss_off", # partoff_5 – discussed politics face-to-face"vol_party_off", # partoff_6 – volunteered offline for party/candidate"donat_party_off", # partoff_7 – donated money offline to party/candidate"donat_NGO_off", # partoff_8 – donated money offline to NGO/association"contact_off", # partoff_9 – contacted politician/official offline"read_campaign_off", # partoff_10 – read leaflets/campaign material"petition_off", # partoff_11 – signed paper petition"boycott_off", # partoff_12 – (boy)cott/buycott participation"button_off"# partoff_13 – wore badge/button/sticker ),activity =c(# --- ONLINE (descrizione sintetica) ---"Search political information online","Like/follow political content","Share/retweet political content","Post own political content","Discuss politics online","Comment on political content","Change profile/status for politics","Volunteer online for party/candidate","Donate money online to party/candidate","Donate money online to NGO/association","Volunteer online for NGO/association","Contact politician/official online","Sign online petition",# --- OFFLINE ---"Attend political meeting/rally","Take part in strike","Take part in demonstration/march","Help organise demonstration","Discuss politics face-to-face","Volunteer offline for party/candidate","Donate money offline to party/candidate","Donate money offline to NGO/association","Contact politician/official offline","Read leaflets/campaign material","Sign paper petition","Take part in (boy)cott/buycott","Wear badge/button/sticker" ))# 9.1 Build data_FACTOR with online + offline items ---------------------data_FACTOR <- EUPeopleNet %>% dplyr::mutate(id = dplyr::row_number()) %>% dplyr::select( id, dplyr::all_of(participation_dict$var_bin) )# Values are already 0/1; in case "9 = prefer not to answer" is present, recode to NAdata_FACTOR <- data_FACTOR %>% dplyr::mutate( dplyr::across(-id,~ dplyr::na_if(.x, 9) ) ) %>% dplyr::mutate( dplyr::across(-id,~as.numeric(.x) ) )# >>> QUI LA CORREZIONE IMPORTANTE <<<# new_name = old_namerename_vec <- stats::setNames( participation_dict$var_bin, # valori = vecchi nomi (parton_1, partoff_1, ...) participation_dict$new_name # nomi = nuovi nomi (pol_inf_on, pol_meet_off, ...))data_FACTOR <- data_FACTOR %>% dplyr::rename(!!!rename_vec)# 9.2 Prepare and test suitability for Factor Analysis ------------------# Drop rows with too many missing values (> 50%)data_FACTOR <- data_FACTOR %>% dplyr::filter(rowMeans(is.na(dplyr::across(-id))) <0.5 )# List of item variablespart_vars <-setdiff(names(data_FACTOR), "id")# Correlation matrix (pairwise)cor_matrix_part <-cor( dplyr::select(data_FACTOR, dplyr::all_of(part_vars)),use ="pairwise.complete.obs")# KMOpsych::KMO(cor_matrix_part)
Warning in FactoMineR::PCA(data_PCA3, quali.sup = quali_sup_idx, quanti.sup =
quanti_sup_idx, : Missing values are imputed by the mean of the variable: you
should use the imputePCA function of the missMDA package
# Description of the dimensions of the PCA:PCA3_desc <- FactoMineR::dimdesc(PCA3_result, axes =1:2, proba =0.05)# First dimensionPCA3_desc$Dim.1
Link between the variable and the continuous variables (R-square)
=================================================================================
correlation p.value
Telegram 0.71078325 1.041739e-200
Twitter_X 0.70387174 3.480574e-195
TikTok 0.69469692 4.276470e-188
Linkedin 0.69259115 1.661726e-186
Instagram 0.68810309 3.654681e-183
YouTube 0.60063333 2.210095e-128
Facebook 0.45909834 8.225746e-69
WhatsApp 0.38904027 2.895111e-48
sup_pol_causes 0.35876171 8.389189e-41
sup_soc_causes 0.35589341 3.890533e-40
inf_pol 0.34752598 3.125067e-38
inf_socially 0.32963437 2.387166e-34
Partisan_mobil 0.27029646 3.228874e-23
Info_Online 0.26409260 3.357295e-22
Info_Offline 0.22951271 5.178604e-17
Civic_Engagement 0.09532225 5.758285e-04
Link between the variable and the categorical variable (1-way anova)
=============================================
R2 p.value
Age_cat 0.16327212 6.198418e-48
Inf_check 0.06810038 6.392291e-19
Inf_disagr 0.06628292 2.200328e-18
Inf_confirm 0.05654758 1.564022e-15
Left_Right 0.02422511 1.796380e-05
Vote 0.02712709 9.909615e-05
Link between variable and the categories of the categorical variables
================================================================
Estimate p.value
Age_cat=18_24 0.8448049 6.314004e-11
Age_cat=35_44 0.4837189 3.139509e-10
Age_cat=25_34 0.5330018 1.714502e-09
Inf_check=Inf_check_Very often 0.8497859 1.457769e-08
Inf_disagr=Inf_disagr_Very often 0.8356138 7.353664e-08
Inf_disagr=Inf_disagr_Often 0.4127128 1.234073e-05
Inf_confirm=Inf_confirm_Very often 0.6980323 1.294134e-05
Inf_check=Inf_check_Often 0.3993228 1.547763e-04
Vote=Forza Italia 0.8322058 3.113801e-04
Inf_confirm=Inf_confirm_Often 0.3868089 1.154004e-03
Left_Right=Ext_right 0.3924648 1.316871e-03
Vote=Movimento 5 Stelle 0.2151232 9.891616e-03
Left_Right=Right 0.2026920 2.072619e-02
Sex=Non-binary 1.0454188 4.902130e-02
Left_Right=No_position -0.3202688 3.374237e-02
Age_cat=55_64 -0.5312895 1.150529e-02
Left_Right=Left -0.3648603 3.203779e-03
Vote=Partito Democratico -0.4564384 2.558011e-04
Inf_confirm=Inf_confirm_Rarely -0.4923457 4.336972e-06
Inf_disagr=Inf_disagr_Rarely -0.4953230 3.847349e-06
Inf_check=Inf_check_Rarely -0.5263152 5.858813e-07
Inf_disagr=Inf_disagr_Never -0.7667999 2.008965e-08
Inf_check=Inf_check_Never -0.7816178 1.656179e-08
Inf_confirm=Inf_confirm_Never -0.7632705 2.767379e-09
Age_cat=65_+ -1.1933958 8.630145e-35
Code
# Second dimensionPCA3_desc$Dim.2
Link between the variable and the continuous variables (R-square)
=================================================================================
correlation p.value
WhatsApp 0.71395047 2.701010e-203
Facebook 0.52331660 2.280502e-92
Instagram 0.30908189 3.383618e-30
inf_socially 0.11211703 5.058913e-05
sup_soc_causes 0.06568003 1.782087e-02
Info_Offline -0.05801716 3.640328e-02
Info_Online -0.07777316 5.003858e-03
Civic_Engagement -0.08401083 2.424021e-03
TikTok -0.16278444 3.519636e-09
Telegram -0.20138465 2.266075e-13
Linkedin -0.30777231 6.067580e-30
Twitter_X -0.40577897 9.692650e-53
Link between the variable and the categorical variable (1-way anova)
=============================================
R2 p.value
Sex 0.037135620 2.156569e-11
Age_cat 0.020498489 6.094449e-05
Vote 0.022809086 9.041707e-04
Left_Right 0.011570927 1.961848e-02
Inf_check 0.008981723 1.971118e-02
Link between variable and the categories of the categorical variables
================================================================
Estimate p.value
Sex=Female 0.3038516 2.406963e-12
Age_cat=45_54 0.1952296 3.438103e-03
Left_Right=Ext_left 0.2183157 2.284974e-02
Vote=Partito Democratico 0.1603081 3.239774e-02
Age_cat=55_64 0.1515135 3.474535e-02
Age_cat=18_24 -0.2195176 2.757226e-02
Vote=Did not vote -0.1609720 1.091000e-02
Left_Right=No_position -0.1506509 1.028280e-02
Inf_check=Inf_check_Very often -0.2023231 1.938446e-03
Age_cat=65_+ -0.1358246 1.922577e-03
Vote=Other party -0.3415773 1.809898e-03
Sex=Male -0.1192441 4.004205e-12
Code
# New biplot with factors as supplementary numerical variablesfactoextra::fviz_pca_var( PCA3_result,col.var ="contrib",gradient.cols =c("#00AFBB", "#E7B800", "#FC4E07"),repel =TRUE)
Warning: ggrepel: 3 unlabeled data points (too many overlaps). Consider
increasing max.overlaps
12.1Canonical Correlation Analysis
Code
# 11. Canonical Correlation Analysis (CCA) -------------------# relationship between platform uses (3 PCA COMPONENTS) & latent dimensions of political participation (5 EFA factors)social_vars <-c("YouTube","WhatsApp","Twitter_X","Instagram","TikTok","Facebook","Linkedin","Telegram")factor_vars <-c("Info_Online", "Partisan_mobil","Civic_Engagement", "Protest_Action", "Info_Offline")# check only complete casescomplete_ids <-complete.cases( data_PCA3[, social_vars], data_PCA3[, factor_vars])message("✅ Using ", sum(complete_ids)," respondents with complete data on platforms and factors.")
✅ Using 995 respondents with complete data on platforms and factors.
Code
pca_data <- data_PCA3[complete_ids, social_vars]efa_data <- data_PCA3[complete_ids, factor_vars]# 11.1 PCA platforms (3 components, as per ES script analyses)pca_res <- psych::principal( pca_data,nfactors =3,rotate ="none",scores =TRUE)pca_scores <-as.data.frame(pca_res$scores)colnames(pca_scores) <-paste0("PC", 1:3) # PC1, PC2, PC3# Participation factors (already estimated) – standardizedefa_scores <-as.data.frame(scale(efa_data))# 11.2 Correlation matrix of PCA components e EFA factorscor_matrix_pca_efa <-cor(cbind(pca_scores, efa_scores),use ="pairwise.complete.obs")corrplot::corrplot( cor_matrix_pca_efa,method ="color",type ="upper",tl.col ="black",tl.cex =0.8,addCoef.col ="black",number.cex =0.6,title ="Correlations between PCA Components and EFA Factors",mar =c(0,0,2,0))
Code
# 11.3 Canonical Correlation Analysis (CCA)if (!requireNamespace("CCA", quietly =TRUE)) {stop("Il pacchetto 'CCA' non è installato. Esegui: install.packages('CCA')")}if (!requireNamespace("CCP", quietly =TRUE)) {stop("Il pacchetto 'CCP' non è installato. Esegui: install.packages('CCP')")}# Blocks for CCAX_pca <- pca_scores # 3 PCA components Y_efa <- efa_scores # 5 EFA factorsdim(X_pca)
[1] 995 3
Code
dim(Y_efa)
[1] 995 5
Code
# 11.3.1 CCA executioncca_result <- CCA::cc(X_pca, Y_efa)# CCAcca_result$cor
12.3Summarize of categorical variables per cluster
Code
# 12.5 Summarize of categorical variables per cluster --------------cat("\n===== Categorical Variables by Cluster =====\n")
===== Categorical Variables by Cluster =====
Code
for (v in cat_vars) {cat("\n###", v, "###\n") tab <-table(data_clustered[[v]], data_clustered$clust)print(tab) test <-suppressWarnings(chisq.test(tab))print(test)}
### Age_cat ###
1 2 3
0_17 0 0 0
18_24 8 46 46
25_34 20 71 66
35_44 18 101 70
45_54 40 145 66
55_64 48 144 39
65_+ 145 183 45
Pearson's Chi-squared test
data: tab
X-squared = NaN, df = 12, p-value = NA
### Vote ###
1 2 3
+Europa 11 16 12
Alleanza Verdi-Sinistra 11 32 23
Azione-Italia Viva 24 41 26
Did not vote 39 95 39
Forza Italia 7 20 17
Fratelli d'Italia 37 90 39
Lega 11 37 11
Movimento 5 Stelle 24 93 50
Other party 21 27 29
Partito Democratico 64 166 54
Pearson's Chi-squared test
data: tab
X-squared = 37.656, df = 18, p-value = 0.0043
### Sex ###
1 2 3
Male 165 285 174
Female 113 403 156
Non-binary 1 2 2
Pearson's Chi-squared test
data: tab
X-squared = 29.797, df = 4, p-value = 5.384e-06
### Left_Right ###
1 2 3
Ext_left 28 91 26
Left 64 162 55
Center 67 162 92
Right 30 87 56
Ext_right 23 64 40
No_position 58 112 50
Pearson's Chi-squared test
data: tab
X-squared = 23.897, df = 10, p-value = 0.007879
### Pol_int ###
1 2 3
Very interested 46 142 73
Somewhat interested 141 292 172
Not very interested 61 198 62
Not at all interested 31 58 25
Pearson's Chi-squared test
data: tab
X-squared = 20.757, df = 6, p-value = 0.002028
### Inf_disagr ###
1 2 3
Very often 24 61 65
Often 71 225 129
sometimes 97 242 106
Rarely 47 95 21
Never 40 67 11
Pearson's Chi-squared test
data: tab
X-squared = 70.25, df = 8, p-value = 4.383e-12
### Inf_check ###
1 2 3
Very often 28 69 75
Often 81 224 133
sometimes 88 244 95
Rarely 45 91 20
Never 37 62 9
Pearson's Chi-squared test
data: tab
X-squared = 74.82, df = 8, p-value = 5.359e-13
### Inf_confirm ###
1 2 3
Very often 32 84 72
Often 89 256 132
sometimes 74 216 99
Rarely 42 73 18
Never 42 61 11
Pearson's Chi-squared test
data: tab
X-squared = 58.171, df = 8, p-value = 1.064e-09
### clust ###
1 2 3
1 279 0 0
2 0 690 0
3 0 0 332
Pearson's Chi-squared test
data: tab
X-squared = 2602, df = 4, p-value < 2.2e-16
Code
# 12.6 Visualization: boxplot for most significant variables----------top_num <-names(head(anova_results, 3))for (v in top_num) { p <-ggplot(data_clustered, aes(x = clust, y = .data[[v]], fill = clust)) +geom_boxplot(alpha =0.7) +theme_minimal() +labs(title =paste("Distribution of", v, "by Cluster"),x ="Cluster", y = v) +theme(legend.position ="none") +scale_fill_brewer(palette ="Dark2")print(p)}
Warning: Removed 69 rows containing non-finite outside the scale range
(`stat_boxplot()`).
Warning: Removed 13 rows containing non-finite outside the scale range
(`stat_boxplot()`).
Warning: Removed 63 rows containing non-finite outside the scale range
(`stat_boxplot()`).
Warning: There was 1 warning in `dplyr::summarise()`.
ℹ In argument: `Welch_p = `$`(...)`.
ℹ In group 1: `Platform = "Facebook"`.
Caused by warning:
! `cur_data()` was deprecated in dplyr 1.1.0.
ℹ Please use `pick()` instead.
Code
knitr::kable( anova_results,digits =3,caption ="Welch ANOVA with eta-squared (per ideology)")
Comparison post-hoc Games–Howell (per party voted)
Platform
group1
group2
mean_difference
p.adj
p_sig
Facebook
+Europa
Alleanza Verdi-Sinistra
0.851
0.494
Facebook
+Europa
Azione-Italia Viva
0.352
0.996
Facebook
+Europa
Did not vote
0.523
0.896
Facebook
+Europa
Forza Italia
1.358
0.072
Facebook
+Europa
Fratelli d’Italia
0.948
0.213
Facebook
+Europa
Lega
1.312
0.067
Facebook
+Europa
Movimento 5 Stelle
1.184
0.041
*
Facebook
+Europa
Other party
0.535
0.946
Facebook
+Europa
Partito Democratico
0.876
0.261
Facebook
Alleanza Verdi-Sinistra
Azione-Italia Viva
-0.499
0.865
Facebook
Alleanza Verdi-Sinistra
Did not vote
-0.328
0.971
Facebook
Alleanza Verdi-Sinistra
Forza Italia
0.508
0.935
Facebook
Alleanza Verdi-Sinistra
Fratelli d’Italia
0.097
1.000
Facebook
Alleanza Verdi-Sinistra
Lega
0.461
0.948
Facebook
Alleanza Verdi-Sinistra
Movimento 5 Stelle
0.333
0.963
Facebook
Alleanza Verdi-Sinistra
Other party
-0.315
0.995
Facebook
Alleanza Verdi-Sinistra
Partito Democratico
0.025
1.000
Facebook
Azione-Italia Viva
Did not vote
0.171
1.000
Facebook
Azione-Italia Viva
Forza Italia
1.007
0.179
Facebook
Azione-Italia Viva
Fratelli d’Italia
0.596
0.459
Facebook
Azione-Italia Viva
Lega
0.960
0.161
Facebook
Azione-Italia Viva
Movimento 5 Stelle
0.833
0.058
Facebook
Azione-Italia Viva
Other party
0.184
1.000
Facebook
Azione-Italia Viva
Partito Democratico
0.524
0.540
Facebook
Did not vote
Forza Italia
0.835
0.270
Facebook
Did not vote
Fratelli d’Italia
0.425
0.607
Facebook
Did not vote
Lega
0.789
0.240
Facebook
Did not vote
Movimento 5 Stelle
0.661
0.043
*
Facebook
Did not vote
Other party
0.013
1.000
Facebook
Did not vote
Partito Democratico
0.353
0.687
Facebook
Forza Italia
Fratelli d’Italia
-0.411
0.963
Facebook
Forza Italia
Lega
-0.047
1.000
Facebook
Forza Italia
Movimento 5 Stelle
-0.174
1.000
Facebook
Forza Italia
Other party
-0.823
0.503
Facebook
Forza Italia
Partito Democratico
-0.483
0.873
Facebook
Fratelli d’Italia
Lega
0.364
0.972
Facebook
Fratelli d’Italia
Movimento 5 Stelle
0.236
0.979
Facebook
Fratelli d’Italia
Other party
-0.412
0.919
Facebook
Fratelli d’Italia
Partito Democratico
-0.072
1.000
Facebook
Lega
Movimento 5 Stelle
-0.128
1.000
Facebook
Lega
Other party
-0.776
0.506
Facebook
Lega
Partito Democratico
-0.436
0.885
Facebook
Movimento 5 Stelle
Other party
-0.649
0.407
Facebook
Movimento 5 Stelle
Partito Democratico
-0.308
0.786
Facebook
Other party
Partito Democratico
0.340
0.963
Instagram
+Europa
Alleanza Verdi-Sinistra
0.369
0.997
Instagram
+Europa
Azione-Italia Viva
0.044
1.000
Instagram
+Europa
Did not vote
-0.280
0.999
Instagram
+Europa
Forza Italia
0.869
0.661
Instagram
+Europa
Fratelli d’Italia
-0.227
1.000
Instagram
+Europa
Lega
-0.029
1.000
Instagram
+Europa
Movimento 5 Stelle
0.125
1.000
Instagram
+Europa
Other party
-0.397
0.996
Instagram
+Europa
Partito Democratico
-0.368
0.993
Instagram
Alleanza Verdi-Sinistra
Azione-Italia Viva
-0.325
0.994
Instagram
Alleanza Verdi-Sinistra
Did not vote
-0.649
0.465
Instagram
Alleanza Verdi-Sinistra
Forza Italia
0.500
0.941
Instagram
Alleanza Verdi-Sinistra
Fratelli d’Italia
-0.597
0.614
Instagram
Alleanza Verdi-Sinistra
Lega
-0.398
0.990
Instagram
Alleanza Verdi-Sinistra
Movimento 5 Stelle
-0.244
0.998
Instagram
Alleanza Verdi-Sinistra
Other party
-0.766
0.480
Instagram
Alleanza Verdi-Sinistra
Partito Democratico
-0.737
0.213
Instagram
Azione-Italia Viva
Did not vote
-0.324
0.980
Instagram
Azione-Italia Viva
Forza Italia
0.825
0.422
Instagram
Azione-Italia Viva
Fratelli d’Italia
-0.271
0.995
Instagram
Azione-Italia Viva
Lega
-0.073
1.000
Instagram
Azione-Italia Viva
Movimento 5 Stelle
0.081
1.000
Instagram
Azione-Italia Viva
Other party
-0.441
0.956
Instagram
Azione-Italia Viva
Partito Democratico
-0.412
0.876
Instagram
Did not vote
Forza Italia
1.149
0.024
*
Instagram
Did not vote
Fratelli d’Italia
0.052
1.000
Instagram
Did not vote
Lega
0.251
0.999
Instagram
Did not vote
Movimento 5 Stelle
0.405
0.797
Instagram
Did not vote
Other party
-0.117
1.000
Instagram
Did not vote
Partito Democratico
-0.089
1.000
Instagram
Forza Italia
Fratelli d’Italia
-1.097
0.044
*
Instagram
Forza Italia
Lega
-0.898
0.470
Instagram
Forza Italia
Movimento 5 Stelle
-0.744
0.426
Instagram
Forza Italia
Other party
-1.266
0.037
*
Instagram
Forza Italia
Partito Democratico
-1.238
0.007
**
Instagram
Fratelli d’Italia
Lega
0.199
1.000
Instagram
Fratelli d’Italia
Movimento 5 Stelle
0.352
0.916
Instagram
Fratelli d’Italia
Other party
-0.170
1.000
Instagram
Fratelli d’Italia
Partito Democratico
-0.141
1.000
Instagram
Lega
Movimento 5 Stelle
0.154
1.000
Instagram
Lega
Other party
-0.368
0.995
Instagram
Lega
Partito Democratico
-0.339
0.989
Instagram
Movimento 5 Stelle
Other party
-0.522
0.792
Instagram
Movimento 5 Stelle
Partito Democratico
-0.493
0.420
Instagram
Other party
Partito Democratico
0.029
1.000
Linkedin
+Europa
Alleanza Verdi-Sinistra
0.199
1.000
Linkedin
+Europa
Azione-Italia Viva
-0.213
1.000
Linkedin
+Europa
Did not vote
-0.350
0.985
Linkedin
+Europa
Forza Italia
0.199
1.000
Linkedin
+Europa
Fratelli d’Italia
-0.696
0.479
Linkedin
+Europa
Lega
-0.543
0.897
Linkedin
+Europa
Movimento 5 Stelle
-0.195
1.000
Linkedin
+Europa
Other party
-0.047
1.000
Linkedin
+Europa
Partito Democratico
-0.406
0.948
Linkedin
Alleanza Verdi-Sinistra
Azione-Italia Viva
-0.413
0.923
Linkedin
Alleanza Verdi-Sinistra
Did not vote
-0.549
0.570
Linkedin
Alleanza Verdi-Sinistra
Forza Italia
0.000
1.000
Linkedin
Alleanza Verdi-Sinistra
Fratelli d’Italia
-0.895
0.028
*
Linkedin
Alleanza Verdi-Sinistra
Lega
-0.742
0.381
Linkedin
Alleanza Verdi-Sinistra
Movimento 5 Stelle
-0.395
0.913
Linkedin
Alleanza Verdi-Sinistra
Other party
-0.246
0.999
Linkedin
Alleanza Verdi-Sinistra
Partito Democratico
-0.605
0.342
Linkedin
Azione-Italia Viva
Did not vote
-0.136
1.000
Linkedin
Azione-Italia Viva
Forza Italia
0.413
0.967
Linkedin
Azione-Italia Viva
Fratelli d’Italia
-0.483
0.434
Linkedin
Azione-Italia Viva
Lega
-0.329
0.977
Linkedin
Azione-Italia Viva
Movimento 5 Stelle
0.018
1.000
Linkedin
Azione-Italia Viva
Other party
0.167
1.000
Linkedin
Azione-Italia Viva
Partito Democratico
-0.193
0.995
Linkedin
Did not vote
Forza Italia
0.549
0.772
Linkedin
Did not vote
Fratelli d’Italia
-0.346
0.656
Linkedin
Did not vote
Lega
-0.193
0.999
Linkedin
Did not vote
Movimento 5 Stelle
0.154
0.999
Linkedin
Did not vote
Other party
0.303
0.974
Linkedin
Did not vote
Partito Democratico
-0.056
1.000
Linkedin
Forza Italia
Fratelli d’Italia
-0.895
0.134
Linkedin
Forza Italia
Lega
-0.742
0.562
Linkedin
Forza Italia
Movimento 5 Stelle
-0.395
0.965
Linkedin
Forza Italia
Other party
-0.246
1.000
Linkedin
Forza Italia
Partito Democratico
-0.605
0.607
Linkedin
Fratelli d’Italia
Lega
0.154
1.000
Linkedin
Fratelli d’Italia
Movimento 5 Stelle
0.501
0.202
Linkedin
Fratelli d’Italia
Other party
0.649
0.220
Linkedin
Fratelli d’Italia
Partito Democratico
0.290
0.699
Linkedin
Lega
Movimento 5 Stelle
0.347
0.948
Linkedin
Lega
Other party
0.496
0.842
Linkedin
Lega
Partito Democratico
0.136
1.000
Linkedin
Movimento 5 Stelle
Other party
0.149
1.000
Linkedin
Movimento 5 Stelle
Partito Democratico
-0.211
0.975
Linkedin
Other party
Partito Democratico
-0.359
0.889
Telegram
+Europa
Alleanza Verdi-Sinistra
0.287
1.000
Telegram
+Europa
Azione-Italia Viva
-0.318
0.998
Telegram
+Europa
Did not vote
0.028
1.000
Telegram
+Europa
Forza Italia
0.653
0.911
Telegram
+Europa
Fratelli d’Italia
0.176
1.000
Telegram
+Europa
Lega
-0.077
1.000
Telegram
+Europa
Movimento 5 Stelle
0.083
1.000
Telegram
+Europa
Other party
0.472
0.966
Telegram
+Europa
Partito Democratico
-0.382
0.978
Telegram
Alleanza Verdi-Sinistra
Azione-Italia Viva
-0.605
0.801
Telegram
Alleanza Verdi-Sinistra
Did not vote
-0.259
0.999
Telegram
Alleanza Verdi-Sinistra
Forza Italia
0.366
0.998
Telegram
Alleanza Verdi-Sinistra
Fratelli d’Italia
-0.111
1.000
Telegram
Alleanza Verdi-Sinistra
Lega
-0.364
0.996
Telegram
Alleanza Verdi-Sinistra
Movimento 5 Stelle
-0.204
1.000
Telegram
Alleanza Verdi-Sinistra
Other party
0.185
1.000
Telegram
Alleanza Verdi-Sinistra
Partito Democratico
-0.669
0.493
Telegram
Azione-Italia Viva
Did not vote
0.346
0.956
Telegram
Azione-Italia Viva
Forza Italia
0.971
0.300
Telegram
Azione-Italia Viva
Fratelli d’Italia
0.494
0.749
Telegram
Azione-Italia Viva
Lega
0.241
1.000
Telegram
Azione-Italia Viva
Movimento 5 Stelle
0.402
0.903
Telegram
Azione-Italia Viva
Other party
0.790
0.258
Telegram
Azione-Italia Viva
Partito Democratico
-0.064
1.000
Telegram
Did not vote
Forza Italia
0.625
0.786
Telegram
Did not vote
Fratelli d’Italia
0.148
1.000
Telegram
Did not vote
Lega
-0.105
1.000
Telegram
Did not vote
Movimento 5 Stelle
0.056
1.000
Telegram
Did not vote
Other party
0.444
0.844
Telegram
Did not vote
Partito Democratico
-0.410
0.565
Telegram
Forza Italia
Fratelli d’Italia
-0.477
0.954
Telegram
Forza Italia
Lega
-0.730
0.801
Telegram
Forza Italia
Movimento 5 Stelle
-0.569
0.869
Telegram
Forza Italia
Other party
-0.181
1.000
Telegram
Forza Italia
Partito Democratico
-1.034
0.114
Telegram
Fratelli d’Italia
Lega
-0.253
0.999
Telegram
Fratelli d’Italia
Movimento 5 Stelle
-0.093
1.000
Telegram
Fratelli d’Italia
Other party
0.296
0.989
Telegram
Fratelli d’Italia
Partito Democratico
-0.558
0.205
Telegram
Lega
Movimento 5 Stelle
0.160
1.000
Telegram
Lega
Other party
0.549
0.883
Telegram
Lega
Partito Democratico
-0.305
0.992
Telegram
Movimento 5 Stelle
Other party
0.388
0.931
Telegram
Movimento 5 Stelle
Partito Democratico
-0.465
0.416
Telegram
Other party
Partito Democratico
-0.853
0.033
*
TikTok
+Europa
Alleanza Verdi-Sinistra
-0.507
0.986
TikTok
+Europa
Azione-Italia Viva
-1.020
0.351
TikTok
+Europa
Did not vote
-0.556
0.941
TikTok
+Europa
Forza Italia
0.440
0.998
TikTok
+Europa
Fratelli d’Italia
-0.638
0.870
TikTok
+Europa
Lega
-0.667
0.919
TikTok
+Europa
Movimento 5 Stelle
-0.169
1.000
TikTok
+Europa
Other party
-0.117
1.000
TikTok
+Europa
Partito Democratico
-1.084
0.200
TikTok
Alleanza Verdi-Sinistra
Azione-Italia Viva
-0.514
0.874
TikTok
Alleanza Verdi-Sinistra
Did not vote
-0.049
1.000
TikTok
Alleanza Verdi-Sinistra
Forza Italia
0.946
0.605
TikTok
Alleanza Verdi-Sinistra
Fratelli d’Italia
-0.131
1.000
TikTok
Alleanza Verdi-Sinistra
Lega
-0.161
1.000
TikTok
Alleanza Verdi-Sinistra
Movimento 5 Stelle
0.338
0.990
TikTok
Alleanza Verdi-Sinistra
Other party
0.389
0.990
TikTok
Alleanza Verdi-Sinistra
Partito Democratico
-0.578
0.645
TikTok
Azione-Italia Viva
Did not vote
0.465
0.694
TikTok
Azione-Italia Viva
Forza Italia
1.460
0.036
*
TikTok
Azione-Italia Viva
Fratelli d’Italia
0.383
0.870
TikTok
Azione-Italia Viva
Lega
0.353
0.988
TikTok
Azione-Italia Viva
Movimento 5 Stelle
0.852
0.038
*
TikTok
Azione-Italia Viva
Other party
0.903
0.139
TikTok
Azione-Italia Viva
Partito Democratico
-0.064
1.000
TikTok
Did not vote
Forza Italia
0.995
0.359
TikTok
Did not vote
Fratelli d’Italia
-0.082
1.000
TikTok
Did not vote
Lega
-0.112
1.000
TikTok
Did not vote
Movimento 5 Stelle
0.387
0.847
TikTok
Did not vote
Other party
0.438
0.914
TikTok
Did not vote
Partito Democratico
-0.529
0.197
TikTok
Forza Italia
Fratelli d’Italia
-1.078
0.250
TikTok
Forza Italia
Lega
-1.107
0.379
TikTok
Forza Italia
Movimento 5 Stelle
-0.609
0.912
TikTok
Forza Italia
Other party
-0.557
0.970
TikTok
Forza Italia
Partito Democratico
-1.524
0.014
*
TikTok
Fratelli d’Italia
Lega
-0.029
1.000
TikTok
Fratelli d’Italia
Movimento 5 Stelle
0.469
0.623
TikTok
Fratelli d’Italia
Other party
0.520
0.784
TikTok
Fratelli d’Italia
Partito Democratico
-0.446
0.403
TikTok
Lega
Movimento 5 Stelle
0.498
0.881
TikTok
Lega
Other party
0.550
0.906
TikTok
Lega
Partito Democratico
-0.417
0.924
TikTok
Movimento 5 Stelle
Other party
0.051
1.000
TikTok
Movimento 5 Stelle
Partito Democratico
-0.915
0.001
***
TikTok
Other party
Partito Democratico
-0.967
0.029
*
Twitter_X
+Europa
Alleanza Verdi-Sinistra
0.351
0.996
Twitter_X
+Europa
Azione-Italia Viva
0.350
0.994
Twitter_X
+Europa
Did not vote
-0.024
1.000
Twitter_X
+Europa
Forza Italia
0.657
0.934
Twitter_X
+Europa
Fratelli d’Italia
-0.104
1.000
Twitter_X
+Europa
Lega
-0.187
1.000
Twitter_X
+Europa
Movimento 5 Stelle
0.237
1.000
Twitter_X
+Europa
Other party
0.538
0.941
Twitter_X
+Europa
Partito Democratico
-0.278
0.997
Twitter_X
Alleanza Verdi-Sinistra
Azione-Italia Viva
-0.002
1.000
Twitter_X
Alleanza Verdi-Sinistra
Did not vote
-0.375
0.955
Twitter_X
Alleanza Verdi-Sinistra
Forza Italia
0.305
1.000
Twitter_X
Alleanza Verdi-Sinistra
Fratelli d’Italia
-0.456
0.864
Twitter_X
Alleanza Verdi-Sinistra
Lega
-0.538
0.914
Twitter_X
Alleanza Verdi-Sinistra
Movimento 5 Stelle
-0.115
1.000
Twitter_X
Alleanza Verdi-Sinistra
Other party
0.186
1.000
Twitter_X
Alleanza Verdi-Sinistra
Partito Democratico
-0.629
0.396
Twitter_X
Azione-Italia Viva
Did not vote
-0.373
0.907
Twitter_X
Azione-Italia Viva
Forza Italia
0.307
0.999
Twitter_X
Azione-Italia Viva
Fratelli d’Italia
-0.454
0.755
Twitter_X
Azione-Italia Viva
Lega
-0.537
0.873
Twitter_X
Azione-Italia Viva
Movimento 5 Stelle
-0.113
1.000
Twitter_X
Azione-Italia Viva
Other party
0.188
1.000
Twitter_X
Azione-Italia Viva
Partito Democratico
-0.628
0.195
Twitter_X
Did not vote
Forza Italia
0.680
0.794
Twitter_X
Did not vote
Fratelli d’Italia
-0.081
1.000
Twitter_X
Did not vote
Lega
-0.164
1.000
Twitter_X
Did not vote
Movimento 5 Stelle
0.260
0.976
Twitter_X
Did not vote
Other party
0.561
0.686
Twitter_X
Did not vote
Partito Democratico
-0.254
0.936
Twitter_X
Forza Italia
Fratelli d’Italia
-0.761
0.675
Twitter_X
Forza Italia
Lega
-0.844
0.728
Twitter_X
Forza Italia
Movimento 5 Stelle
-0.420
0.989
Twitter_X
Forza Italia
Other party
-0.119
1.000
Twitter_X
Forza Italia
Partito Democratico
-0.934
0.347
Twitter_X
Fratelli d’Italia
Lega
-0.083
1.000
Twitter_X
Fratelli d’Italia
Movimento 5 Stelle
0.341
0.879
Twitter_X
Fratelli d’Italia
Other party
0.642
0.504
Twitter_X
Fratelli d’Italia
Partito Democratico
-0.174
0.995
Twitter_X
Lega
Movimento 5 Stelle
0.424
0.950
Twitter_X
Lega
Other party
0.725
0.670
Twitter_X
Lega
Partito Democratico
-0.091
1.000
Twitter_X
Movimento 5 Stelle
Other party
0.301
0.993
Twitter_X
Movimento 5 Stelle
Partito Democratico
-0.514
0.216
Twitter_X
Other party
Partito Democratico
-0.816
0.120
WhatsApp
+Europa
Alleanza Verdi-Sinistra
-0.138
1.000
WhatsApp
+Europa
Azione-Italia Viva
-0.311
0.977
WhatsApp
+Europa
Did not vote
-0.395
0.850
WhatsApp
+Europa
Forza Italia
-0.068
1.000
WhatsApp
+Europa
Fratelli d’Italia
-0.078
1.000
WhatsApp
+Europa
Lega
-0.103
1.000
WhatsApp
+Europa
Movimento 5 Stelle
-0.108
1.000
WhatsApp
+Europa
Other party
-0.289
0.986
WhatsApp
+Europa
Partito Democratico
-0.137
1.000
WhatsApp
Alleanza Verdi-Sinistra
Azione-Italia Viva
-0.173
0.998
WhatsApp
Alleanza Verdi-Sinistra
Did not vote
-0.257
0.920
WhatsApp
Alleanza Verdi-Sinistra
Forza Italia
0.070
1.000
WhatsApp
Alleanza Verdi-Sinistra
Fratelli d’Italia
0.060
1.000
WhatsApp
Alleanza Verdi-Sinistra
Lega
0.035
1.000
WhatsApp
Alleanza Verdi-Sinistra
Movimento 5 Stelle
0.031
1.000
WhatsApp
Alleanza Verdi-Sinistra
Other party
-0.151
0.999
WhatsApp
Alleanza Verdi-Sinistra
Partito Democratico
0.001
1.000
WhatsApp
Azione-Italia Viva
Did not vote
-0.084
1.000
WhatsApp
Azione-Italia Viva
Forza Italia
0.243
0.993
WhatsApp
Azione-Italia Viva
Fratelli d’Italia
0.233
0.950
WhatsApp
Azione-Italia Viva
Lega
0.208
0.996
WhatsApp
Azione-Italia Viva
Movimento 5 Stelle
0.203
0.980
WhatsApp
Azione-Italia Viva
Other party
0.022
1.000
WhatsApp
Azione-Italia Viva
Partito Democratico
0.174
0.991
WhatsApp
Did not vote
Forza Italia
0.327
0.913
WhatsApp
Did not vote
Fratelli d’Italia
0.317
0.474
WhatsApp
Did not vote
Lega
0.292
0.917
WhatsApp
Did not vote
Movimento 5 Stelle
0.287
0.632
WhatsApp
Did not vote
Other party
0.106
1.000
WhatsApp
Did not vote
Partito Democratico
0.258
0.677
WhatsApp
Forza Italia
Fratelli d’Italia
-0.010
1.000
WhatsApp
Forza Italia
Lega
-0.035
1.000
WhatsApp
Forza Italia
Movimento 5 Stelle
-0.040
1.000
WhatsApp
Forza Italia
Other party
-0.221
0.997
WhatsApp
Forza Italia
Partito Democratico
-0.069
1.000
WhatsApp
Fratelli d’Italia
Lega
-0.025
1.000
WhatsApp
Fratelli d’Italia
Movimento 5 Stelle
-0.029
1.000
WhatsApp
Fratelli d’Italia
Other party
-0.211
0.974
WhatsApp
Fratelli d’Italia
Partito Democratico
-0.059
1.000
WhatsApp
Lega
Movimento 5 Stelle
-0.004
1.000
WhatsApp
Lega
Other party
-0.186
0.998
WhatsApp
Lega
Partito Democratico
-0.034
1.000
WhatsApp
Movimento 5 Stelle
Other party
-0.182
0.991
WhatsApp
Movimento 5 Stelle
Partito Democratico
-0.030
1.000
WhatsApp
Other party
Partito Democratico
0.152
0.997
YouTube
+Europa
Alleanza Verdi-Sinistra
0.611
0.497
YouTube
+Europa
Azione-Italia Viva
0.552
0.644
YouTube
+Europa
Did not vote
0.474
0.696
YouTube
+Europa
Forza Italia
1.126
0.023
*
YouTube
+Europa
Fratelli d’Italia
0.608
0.353
YouTube
+Europa
Lega
0.395
0.969
YouTube
+Europa
Movimento 5 Stelle
0.711
0.139
YouTube
+Europa
Other party
0.558
0.688
YouTube
+Europa
Partito Democratico
0.059
1.000
YouTube
Alleanza Verdi-Sinistra
Azione-Italia Viva
-0.059
1.000
YouTube
Alleanza Verdi-Sinistra
Did not vote
-0.136
1.000
YouTube
Alleanza Verdi-Sinistra
Forza Italia
0.515
0.768
YouTube
Alleanza Verdi-Sinistra
Fratelli d’Italia
-0.002
1.000
YouTube
Alleanza Verdi-Sinistra
Lega
-0.215
0.999
YouTube
Alleanza Verdi-Sinistra
Movimento 5 Stelle
0.101
1.000
YouTube
Alleanza Verdi-Sinistra
Other party
-0.053
1.000
YouTube
Alleanza Verdi-Sinistra
Partito Democratico
-0.551
0.207
YouTube
Azione-Italia Viva
Did not vote
-0.078
1.000
YouTube
Azione-Italia Viva
Forza Italia
0.574
0.646
YouTube
Azione-Italia Viva
Fratelli d’Italia
0.056
1.000
YouTube
Azione-Italia Viva
Lega
-0.157
1.000
YouTube
Azione-Italia Viva
Movimento 5 Stelle
0.159
0.999
YouTube
Azione-Italia Viva
Other party
0.006
1.000
YouTube
Azione-Italia Viva
Partito Democratico
-0.493
0.363
YouTube
Did not vote
Forza Italia
0.652
0.324
YouTube
Did not vote
Fratelli d’Italia
0.134
0.999
YouTube
Did not vote
Lega
-0.079
1.000
YouTube
Did not vote
Movimento 5 Stelle
0.237
0.948
YouTube
Did not vote
Other party
0.083
1.000
YouTube
Did not vote
Partito Democratico
-0.415
0.278
YouTube
Forza Italia
Fratelli d’Italia
-0.518
0.650
YouTube
Forza Italia
Lega
-0.730
0.484
YouTube
Forza Italia
Movimento 5 Stelle
-0.415
0.852
YouTube
Forza Italia
Other party
-0.568
0.710
YouTube
Forza Italia
Partito Democratico
-1.066
0.003
**
YouTube
Fratelli d’Italia
Lega
-0.213
0.999
YouTube
Fratelli d’Italia
Movimento 5 Stelle
0.103
1.000
YouTube
Fratelli d’Italia
Other party
-0.051
1.000
YouTube
Fratelli d’Italia
Partito Democratico
-0.549
0.037
*
YouTube
Lega
Movimento 5 Stelle
0.316
0.976
YouTube
Lega
Other party
0.162
1.000
YouTube
Lega
Partito Democratico
-0.336
0.956
YouTube
Movimento 5 Stelle
Other party
-0.154
1.000
YouTube
Movimento 5 Stelle
Partito Democratico
-0.652
0.002
**
YouTube
Other party
Partito Democratico
-0.498
0.467
Code
# Grapth per party votedggplot(desc_stats_vote,aes(x = Vote, y = mean, fill = Vote)) +geom_col(position ="dodge", color ="black") +geom_errorbar(aes(ymin = mean - se, ymax = mean + se),width =0.2,position =position_dodge(0.9)) +facet_wrap(~ Platform, scales ="free_y") +labs(title ="Platform use frequency and party voted in general elections",x ="Party voted",y ="Platform use frequency (±SE)" ) +scale_fill_viridis_d() +theme_minimal() +theme(legend.position ="none",axis.text.x =element_text(angle =90, hjust =1) )
Code
# 13.3 Platform and age (Age_cat) -------------------# Descriptives of platforms and age categoriesdesc_stats_age <- data_PCA3 %>% tidyr::pivot_longer(cols = dplyr::all_of(social_vars),names_to ="Platform",values_to ="Frequency" ) %>% dplyr::group_by(Platform, Age_cat) %>% dplyr::summarise(n = dplyr::n(),mean =mean(Frequency, na.rm =TRUE),sd =sd(Frequency, na.rm =TRUE),se = sd /sqrt(n),.groups ="drop" )knitr::kable( desc_stats_age,digits =2,caption ="Descriptives for platforms and age categories")
# Graph for ageggplot(desc_stats_age,aes(x = Age_cat, y = mean, fill = Age_cat)) +geom_col(position ="dodge", color ="grey30") +geom_errorbar(aes(ymin = mean - se, ymax = mean + se),width =0.2,position =position_dodge(0.9)) +facet_wrap(~ Platform, scales ="free_y") +labs(title ="Platform use frequence and age class",x ="Age classes",y ="Platform use frequence (±SE)" ) +scale_fill_viridis_d() +theme_minimal() +theme(legend.position ="none",axis.text.x =element_text(angle =90, hjust =1) )
14 OLS regression model (Platform use as DV)
Code
# 14. OLSlibrary(broom)
Warning: il pacchetto 'broom' è stato creato con R versione 4.4.2
Code
library(car)
Warning: il pacchetto 'car' è stato creato con R versione 4.4.3
Caricamento del pacchetto richiesto: carData
Warning: il pacchetto 'carData' è stato creato con R versione 4.4.3
Caricamento pacchetto: 'car'
Il seguente oggetto è mascherato da 'package:psych':
logit
Il seguente oggetto è mascherato da 'package:dplyr':
recode
Code
library(purrr)
Warning: il pacchetto 'purrr' è stato creato con R versione 4.4.2
Caricamento pacchetto: 'purrr'
Il seguente oggetto è mascherato da 'package:car':
some
Il seguente oggetto è mascherato da 'package:scales':
discard