USArrests(1973년 미국 50개주 십만명당 강력범죄수)
# 4개 변수간 산점도 > library(datasets) > data("USArrests") > pairs(USArrests, panel=panel.smooth, main="USArrests data") # 주성분 분석실시 > US.prin <- princomp(USArrests, cor=TRUE) # 주성분 분석결과 요약 > summary(US.prin) Importance of components: Comp.1 Comp.2 Comp.3 Comp.4 Standard deviation 1.5748783 0.9948694 0.5971291 0.41644938 Proportion of Variance 0.6200604 0.2474413 0.0891408 0.04335752 Cumulative Proportion 0.6200604 0.8675017 0.9566425 1.00000000 # Murder, Assault, UrbanPop, Rape 4개 변수의 주성분 Comp.1~Comp.4에 대한 기여도 > loadings(US.prin) Loadings: Comp.1 Comp.2 Comp.3 Comp.4 Murder -0.536 0.418 -0.341 0.649 Assault -0.583 0.188 -0.268 -0.743 UrbanPop -0.278 -0.873 -0.378 0.134 Rape -0.543 -0.167 0.818 Comp.1 Comp.2 Comp.3 Comp.4 SS loadings 1.00 1.00 1.00 1.00 Proportion Var 0.25 0.25 0.25 0.25 Cumulative ...