How to use R language to realize Principal component Analysis
In this issue, the editor will bring you about how to use R language to achieve principal component analysis. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
It is suggested that we directly use R language to achieve principal component analysis, and send a case first today.
Using R language to bring USJudgeRatings judge comprehensive quality score data, each judge has 12 dimensions to score. We think that using 12 indicators to evaluate a judge is too complicated. Now please reduce the dimensions of the 12 dimension scoring variables and create several principal components for comprehensive evaluation.
The data are as follows:
Load package:
Library (psych)
Draw a map of gravel with parallel analysis:
Fa.parallel (USJudgeRatings, fa = "pc", n.iter = 100, show.legend = TRUE, main = 'Scree plot with parallel analysis')
This picture tells us that it seems to extract a principal component. The experience and method of judging the number of principal components is not only this one. I think it is a bit paranoid to extract only one principal component. We can consider mentioning one more principal component and extracting a total of two principal components for investigation.
Next, start the principal component analysis, do not rotate for the time being:
USJ.pc