R
データセット取り込み
データはExcel関数 Rand()で作成しました。
少数第3位四捨五入。
🔗
Document
主成分分析.xlsx
(6.24 KB)
Image
Image
Image
Image
Image
Console 表示
View(主成分分析)
RcmdrMsg: [8] メモ: データセット 主成分分析 には 15 行、8 列あります.
Rcmdr> local({
Rcmdr+ .PC <- princomp(~V2+V3+V4+V5+V6+V7+V8, cor=TRUE, data=主成分分析)
Rcmdr+ cat("\nComponent loadings:\n")
Rcmdr+ print(unclass(loadings(.PC)))
Rcmdr+ cat("\nComponent variances:\n")
Rcmdr+ print(.PC$sd^2)
Rcmdr+ cat("\n")
Rcmdr+ print(summary(.PC))
Rcmdr+ })
Component loadings:
Comp.1 Comp.2 Comp.3 Comp.4 Comp.5 Comp.6
V2 0.4972161 0.3354857 0.08213209 0.16755636 0.1597999 0.3477327683
V3 -0.3821378 0.1058542 -0.02598889 0.77574698 0.4844147 0.0004428644
V4 0.2905740 -0.4650790 0.53826725 -0.07286824 0.4277152 0.3521870404
V5 -0.4666038 0.3149275 0.16557761 -0.11021601 -0.2715076 0.7445393159
V6 0.3383595 0.5291279 -0.39159908 -0.18596781 0.3441370 0.0829370282
V7 -0.1389770 -0.4826563 -0.68673089 -0.16356066 0.2536418 0.3736752951
V8 0.4132707 -0.2187076 -0.22468236 0.53976663 -0.5480741 0.2327991507
Comp.7
V2 0.67745889
V3 -0.07515984
V4 -0.31185072
V5 -0.12443033
V6 -0.54064199
V7 0.21309504
V8 -0.29148485
Component variances:
Comp.1 Comp.2 Comp.3 Comp.4 Comp.5 Comp.6 Comp.7
2.6158470 1.2877329 1.1172947 0.7884729 0.5407613 0.3945932 0.2552981
Importance of components:
Comp.1 Comp.2 Comp.3 Comp.4 Comp.5
Standard deviation 1.6173580 1.1347832 1.0570216 0.8879600 0.73536473
Proportion of Variance 0.3736924 0.1839618 0.1596135 0.1126390 0.07725161
Cumulative Proportion 0.3736924 0.5576543 0.7172678 0.8299068 0.90715839
Comp.6 Comp.7
Standard deviation 0.62816653 0.50527032
Proportion of Variance 0.05637046 0.03647116
Cumulative Proportion 0.96352884 1.00000000
RcmdrMsg: [9] 警告: メモリにあるデータセットは1つだけです.
Image
Image
Image
Image