作者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