Extracting output from principal function in psych package as a data frame

后端 未结 2 1784
不知归路
不知归路 2020-12-17 19:06

When I use the principal function, like in the following code, I get a nice table which gives all the standardized loadings, as well as a table with the eigenvalues and the

相关标签:
2条回答
  • 2020-12-17 19:22

    Why not this:

     capture.output( print(rotatedpca), file="pc.txt")
    

    You can read desired portions into Excel using its Text to Columns... function off the /Data menu. Or you can just paste it into an open blank Excel document and select the rows you want to convert. Use the "fixed" option that will probably be offered automagically.

    0 讨论(0)
  • 2020-12-17 19:26

    I have just added this feature to the latest (as of today) release of psych 1.3.10.11. If you either

     f3 <- fa(Thurstone,3) 
       #or
       p3 <- principal(Thurstone,3)
       #then
       p <- print(f3)
       p # will give you
        p
       $Vaccounted
                                MR1       MR2       MR3
       SS loadings           2.6411150 1.8621522 1.4951831
      Proportion Var        0.2934572 0.2069058 0.1661315
      Cumulative Var        0.2934572 0.5003630 0.6664945
      Proportion Explained  0.4402995 0.3104389 0.2492616
      Proportion            0.4402995 0.7507384 1.0000000
    

    In general, if you have suggestions or questions re the psych package, you will get a faster answer if you contact me directly.

    Bill

    0 讨论(0)
提交回复
热议问题