I work on 4 different countries represented in a database N=2500: France, Germany, Australia. For each country I have opinion variables on political candidates. These variables: scale_ "candidate's name", are coded in the following way a value of 1 is equal to a very negative opinion and 10 to a very positive opinion.
The individuals in my database are not all from the same country, so the number of missing values for each of these variables includes both individuals from other countries and individuals from the country who did not answer the question about the candidate.
I would like to create a left-right placement variable for all these individuals from my opinion variables. The ultimate goal is to implement this new left right palcement variable in my general dataset D.
I'm trying to do a PCA but I'm running into interpretation difficulties and I'm a bit stuck.
As of now I figured it would be easyer to work country by country hence I divided my dataset in 4.
# Dividing te dataset in 4
french_data<-subset(D, D$cntry == "France")
german_data<-subset(D, D$cntry== "Germany")
aust_data<- subset(D, D$cntry== "Austria")
dutch_data<- subset(D,D$cntry== "Netherlands")
# I will take my french sample as an example:
# Isolate the variables and deal with NAs
french_data <- french_data[, c("scale_Faure", "scale_Macron", "scale_ Le Pen",
"scale_Jacob", "scale_JLM", "scale_ Jadot")]
# Replace them with the column mean
french_data<-french_data %>%
mutate_if(is.numeric, ~replace_na(.,mean(., na.rm = TRUE)))
view(french_data)
# Perform PCA
acpfr<-prcomp(french_data, center = TRUE, scale. = TRUE)
# PCA coefficients
print(acpfr$rotation)
PC1 PC2 PC3 PC4
scale_Faure 0.53843404 -0.2250947 0.23983503 0.2561127
scale_Macron 0.21404458 0.4849783 -0.66993526 0.3172137
scale_ Le Pen 0.05153401 0.6750354 0.55336030 -0.3427580
scale_Jacob 0.45431307 0.4062040 0.04222295 0.1604051
scale_JLM 0.39125881 -0.1228762 -0.37745970 -0.8235126
scale_ Jadot 0.54966729 -0.2799203 0.20784534 0.1113373
PC5 PC6
scale_Faure -0.3028698 0.66676571
scale_Macron -0.4050550 -0.07398445
scale_ Le Pen -0.3415634 -0.03626538
scale_Jacob 0.7739880 0.04503232
scale_JLM 0.0200508 0.10376513
scale_ Jadot -0.1675569 -0.73201058
I am left with those numbers which I have trouble to intepret first. Second I am kind of lost as to what the next steps are considering my goal. What should I do next ?
Thanks in advance for your help.