我正在通过psych-package进行因子分析,这会生成相当多的输出fa8<-fa(corMat, nfactors=8, ...)
输出包括一些矩阵和一些文本信息。但是,我没有找到将输出矩阵保存到文件的好方法。到目前为止,我能够通过sink("foo.txt"); f8; sink()
转储数据作为完整输出。 write(fa8)
和write.csv(fa8)
都不起作用,因为输出的类是向量 - 但它本身不包含矩阵数据。
有关如何获取fa-matrix进行进一步分析并将其保存到文件的任何建议?
更新#1:
fa(corMat, nfactors=2, ...)
的示例输出将是
Factor Analysis using method = pa
Call: fa(r = corMat, nfactors = 2, rotate = "oblimin", fm = "pa")
Standardized loadings based upon correlation matrix
PA1 PA2 h2 u2
BIO 0.86 0.02 0.75 0.255
GEO 0.78 0.05 0.63 0.369
CHEM 0.87 -0.05 0.75 0.253
ALG -0.04 0.81 0.65 0.354
CALC 0.01 0.96 0.92 0.081
STAT 0.13 0.50 0.29 0.709
PA1 PA2
SS loadings 2.14 1.84
Proportion Var 0.36 0.31
Cumulative Var 0.36 0.66
With factor correlations of
PA1 PA2
PA1 1.00 0.21
PA2 0.21 1.00
Test of the hypothesis that 2 factors are sufficient.
The degrees of freedom for the null model are 15 and the objective function was 2.87
The degrees of freedom for the model are 4 and the objective function was 0.01
The root mean square of the residuals is 0.01
The df corrected root mean square of the residuals is 0.02
Fit based upon off diagonal values = 1
Measures of factor score adequacy
PA1 PA2
Correlation of scores with factors 0.94 0.96
Multiple R square of scores with factors 0.88 0.93
Minimum correlation of possible factor scores 0.77 0.86
来源:http://rtutorialseries.blogspot.de/2011/10/r-tutorial-series-exploratory-factor.html
问题是:如何在输出中获得标准化的加载矩阵以进行进一步分析?