library(poliscidata)
# We are going to map the thermometer subjects based on their correlations
variableSet = cbind(liberals=nes$ftgr_liberals, feminists=nes$ftgr_feminists,
big_biz=nes$ftgr_bigbus, military=nes$ftgr_military,
atheists=nes$ftgr_atheists, gays=nes$ftgr_gay,
asians=nes$ftcasi_asian,
illegal_imm=nes$ftcasi_illegal,
supreme_court=nes$ftgr_ussc,
muslims=nes$ftgr_muslims,
mormons=nes$ftgr_mormons,
hillary_clinton=nes$ft_hclinton,
blacks=nes$ftcasi_black,
democrats=nes$ft_dem,
republicans=nes$ft_rep,
obama=nes$obama_therm,
whites=nes$ftcasi_white,
catholics=nes$ftgr_catholics,
congress=nes$ftgr_congress,
poor=nes$ftgr_poor,
rich=nes$ftgr_rich,
john_roberts=nes$ftpo_roberts,
tea_party=nes$ftgr_tea,
unions=nes$ftgr_unions,
christians=nes$ftgr_xian,
welfare=nes$ftgr_welfare,
conservatives=nes$ftgr_cons,
working_class=nes$ftgr_working,
middle_class=nes$ftgr_middle
)
# We will focus on the correlations only
# For simplicity, rounding the results to 2 decimal places
corr_matrix = wtd.cor(variableSet, weight=nes$wt)$correlation
# creating a map
dist_matrix = 1 - corr_matrix
plot(smacof::mds(dist_matrix, ndim=2), main="Multi-Dimensional Scaling of Feeling Thermometers")