Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to use R language to realize Principal component Analysis

Shulou Source: shulou.com Published: 2022-06-01 22:15:35 10月02日 Update

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

Tags: Component analysis variable index load synthesis language score variance judge feature eigenvalue dimension contribution proportion evaluation larger consistent next representative Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Shulou Tech Info Linux MariaDB MySQL