作者tokyo291 (工口工口)
看板Statistics
標題[程式] R的factor analysis
時間Wed Jun 6 23:58:39 2012
[軟體程式類別]:
R
[程式問題]:
多變量的facotr analysis
[軟體熟悉度]:
中(3個月到1年)
[問題敘述]:
想對一個correlation matrix作factor analysis裡面的
principal component method和 maximum likelihood method
有試過用 factanal factor.pa 去作
可是都和自己用手算出來的不一樣
(原題為using the measurements x1~x4,obtain the solution for factors
models with m=2)
想請問該如何作調整呢?感謝!
[程式範例]:
R1<-matrix(c(1,0.4919,0.2635,0.4653,-0.2277,0.0652,
0.4919,1,0.3127,0.3506,-0.1917,0.2045,
0.2636,0.3127,1,0.4108,0.0647,0.2493,
0.4653,0.3506,0.4108,1,-0.2249,0.2293,
-0.2277,-0.1917,0.0647,-0.2249,1,-0.2144,
0.0652,0.2045,0.2493,0.2293,-0.2144,1),nrow=6,byrow=FALSE)
factor.pa(R1,nfactors=4)
factanal(x, factors=4)
-----------------------------------------------------------------------------
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.175.99.234
1F:→ andrew43:是不是有無轉軸的關係? 06/07 01:09
2F:推 allen1985:factanal(covmat=R1) 你的程式裡R1變成原始資料了 06/07 12:17