Pretest PCA

PCA

pca_data <- pretest_data[,3:8] #pull just the gender characteristic columns

data_normalized <- scale(pca_data)
head(data_normalized) #normalize the data
     Decisive.Indecisive Strong.Weak Inspiring.Uninspiring Dishonest.Honest
[1,]          -1.0385484  -0.6000738            -0.3349686        0.9702373
[2,]           0.6589557   0.8926097             0.5251443       -1.3012595
[3,]           0.6589557  -0.6000738            -0.3349686        0.9702373
[4,]           0.6589557   0.8926097             0.5251443        0.2130717
[5,]           1.5077078   1.6389515             1.3852573       -1.3012595
[6,]          -0.1897963   0.1462680            -0.3349686        0.2130717
     Harsh.Compassionate Against.equality.For.equality
[1,]           0.5208243                     0.3557871
[2,]          -1.2433294                    -1.2442498
[3,]           1.4029011                     1.1558055
[4,]           0.5208243                     0.3557871
[5,]          -1.2433294                    -1.2442498
[6,]          -0.3612526                     0.3557871
data.pca <- princomp(data_normalized)
summary(data.pca)
Importance of components:
                          Comp.1    Comp.2     Comp.3     Comp.4     Comp.5
Standard deviation     1.8922151 1.0125529 0.66090518 0.60921557 0.55774044
Proportion of Variance 0.5982495 0.1713077 0.07298265 0.06201308 0.05197633
Cumulative Proportion  0.5982495 0.7695571 0.84253980 0.90455288 0.95652920
                          Comp.6
Standard deviation     0.5100681
Proportion of Variance 0.0434708
Cumulative Proportion  1.0000000

Contribution to PCA

data.pca$loadings[, 1:3]
                                  Comp.1     Comp.2      Comp.3
Decisive.Indecisive            0.2374737  0.8086153  0.51932318
Strong.Weak                    0.3886839  0.4106341 -0.70760931
Inspiring.Uninspiring          0.4538161 -0.1156917 -0.13194661
Dishonest.Honest              -0.4575839  0.1753043 -0.06414359
Harsh.Compassionate           -0.4168051  0.3004526 -0.45582129
Against.equality.For.equality -0.4510792  0.2076849  0.01717992

Scree Plot

fviz_eig(data.pca, addlabels = TRUE)

Biplot of the attributes

fviz_pca_var(data.pca, col.var = "black")

Mapping onto PartyId

Decisive / Indecisive mapped onto respondent party id

very_filtered_data <- pretest_data |> 
  filter(partyid != 0) |> 
  mutate(partyid_numeric = as.numeric(partyid))


correlation_spearman <- cor(very_filtered_data$partyid_numeric, very_filtered_data$Decisive.Indecisive, method = "spearman")

print(correlation_spearman)
[1] 0.05237014

Strong / Weak mapped onto party id

very_filtered_data <- pretest_data |>    
  filter(partyid != 0) |>   
  mutate(partyid_numeric = as.numeric(partyid))   

correlation_spearman <- cor(very_filtered_data$partyid_numeric, very_filtered_data$Strong.Weak, method = "spearman") 

print(correlation_spearman)  
[1] 0.1216528

Decisive/Indecisive mapped onto partyid by condition

Condition 1

filtered_data_condition_1<- pretest_data |> 
  filter(Condition.number == 1) |> 
  filter(partyid != 0) |> 
  mutate(partyid_numeric = as.numeric(partyid))


correlation_spearman <- cor(filtered_data_condition_1$partyid_numeric, filtered_data_condition_1$Decisive.Indecisive, method = "spearman")

print(correlation_spearman)
[1] 0.1272351

Condition 2

filtered_data_condition_2<- pretest_data |> 
  filter(Condition.number == 2) |> 
  filter(partyid != 0) |> 
  mutate(partyid_numeric = as.numeric(partyid))


correlation_spearman <- cor(filtered_data_condition_2$partyid_numeric, filtered_data_condition_2$Decisive.Indecisive, method = "spearman")

print(correlation_spearman)
[1] 0.1628363

Condition 3

filtered_data_condition_3<- pretest_data |> 
  filter(Condition.number == 3) |> 
  filter(partyid != 0) |> 
  mutate(partyid_numeric = as.numeric(partyid))


correlation_spearman <- cor(filtered_data_condition_3$partyid_numeric, filtered_data_condition_3$Decisive.Indecisive, method = "spearman")

print(correlation_spearman)
[1] -0.06386941

Condition 4

filtered_data_condition_4<- pretest_data |> 
  filter(Condition.number == 4) |> 
  filter(partyid != 0) |> 
  mutate(partyid_numeric = as.numeric(partyid))


correlation_spearman <- cor(filtered_data_condition_4$partyid_numeric, filtered_data_condition_4$Decisive.Indecisive, method = "spearman")

print(correlation_spearman)
[1] -0.03085212

Condition 5

)

print(kruskal_test)

filtered_data_condition_5<- pretest_data |> 
  filter(Condition.number == 5) |> 
  filter(partyid != 0) |> 
  mutate(partyid_numeric = as.numeric(partyid))


correlation_spearman <- cor(filtered_data_condition_5$partyid_numeric, filtered_data_condition_5$Decisive.Indecisive, method = "spearman")

print(correlation_spearman)
[1] -0.05527474

Condition 6

filtered_data_condition_6<- pretest_data |> 
  filter(Condition.number == 6) |> 
  filter(partyid != 0) |> 
  mutate(partyid_numeric = as.numeric(partyid))


correlation_spearman <- cor(filtered_data_condition_6$partyid_numeric, filtered_data_condition_6$Decisive.Indecisive, method = "spearman")

print(correlation_spearman)
[1] 0.05229769
filtered_data_condition_6<- pretest_data |> 
  filter(Condition.number == 6) |> 
  filter(partyid != 0) |> 
  mutate(partyid_numeric = as.numeric(partyid))


correlation_spearman <- cor(filtered_data_condition_6$partyid_numeric, filtered_data_condition_6$Decisive.Indecisive, method = "spearman")

print(correlation_spearman)
[1] 0.05229769

Characteristics mapped onto respondent perception of party for statement

Decisive/Indecisive by perceived party

correlation_spearman <- cor(pretest_data$perceived.party, pretest_data$Decisive.Indecisive, method = "spearman") 

print(correlation_spearman)  
[1] -0.04981832

Strong / Weak by perceived party

correlation_spearman <- cor(pretest_data$perceived.party, pretest_data$Strong.Weak, method = "spearman") 

print(correlation_spearman)  
[1] 0.00233975

Mapping characteristic onto perceived threat to democracy

Decisive/Indecisive mapped onto threat to democracy

correlation_spearman <- cor(pretest_data$Good.for.democracy...1...disagree..5...agree., pretest_data$Decisive.Indecisive, method = "spearman")

print(correlation_spearman)
[1] -0.1349119

Strong/Weak mapped onto threat to democracy

correlation_spearman <- cor(pretest_data$Good.for.democracy...1...disagree..5...agree., pretest_data$Strong.Weak, method = "spearman")

print(correlation_spearman)
[1] -0.4241228

Harsh / Compassionate as threat to democracy

correlation_spearman <- cor(pretest_data$Good.for.democracy...1...disagree..5...agree., pretest_data$Harsh.Compassionate, method = "spearman")

print(correlation_spearman)
[1] 0.5904786

Against equality/ For equality as threat to democracy

correlation_spearman <- cor(pretest_data$Good.for.democracy...1...disagree..5...agree., pretest_data$Against.equality.For.equality, method = "spearman")

print(correlation_spearman)
[1] 0.6906729

Dishonest / Honest as threat to democracy

correlation_spearman <- cor(pretest_data$Good.for.democracy...1...disagree..5...agree., pretest_data$Dishonest.Honest, method = "spearman")

print(correlation_spearman)
[1] 0.7018671

Inspiring / Uninspiring as threat to democracy

correlation_spearman <- cor(pretest_data$Good.for.democracy...1...disagree..5...agree., pretest_data$Inspiring.Uninspiring, method = "spearman")

print(correlation_spearman)
[1] -0.633741