factor_analysis_result Provides easy access to factor analysis results

factor_analysis_results(data, results = 1)

Arguments

data

list output from factor_analysis

results

factor analysis results to extract. Can use either results name or number (i.e. fa_scores or 2)::

  1. fa_loadings (default)

  2. fa_scores

  3. fa_loadings_rotated

  4. fa_scores_rotated

  5. num_factors

Value

Returns the one of the selected results:

  1. fa_loadings: numerical matrix with the original factor loadings

  2. fa_scores: numerical matrix with the row scores for each factor

  3. fa_loadings_rotated: numerical matrix with the varimax rotated factor loadings

  4. fa_scores_rotated: numerical matrix with the row scores for each varimax rotated factor

  5. num_factors: numeric vector identifying the number of factors

See also

factor_analysis for computing the factor analysis results

Examples

# An efficient means for getting factor analysis results x <- matrix(rnorm(200*3), ncol = 10) N <- nrow(x) p <- ncol(x) x %>% horns_curve() %>% factor_analysis(x, hc_points = .) %>% factor_analysis_results(fa_scores_rotated)
#> [,1] [,2] [,3] [,4] [,5] #> [1,] 0.378148027 -1.31672915 -0.035472799 -0.45212148 -0.252999496 #> [2,] 0.091222726 -0.88818154 0.241522862 0.35580822 -0.036029798 #> [3,] -0.470902851 1.68187178 0.555531807 0.74962950 -0.399465987 #> [4,] -0.443961803 0.86292751 1.009037291 -1.01362058 0.543264230 #> [5,] -0.453848602 1.00162506 1.853800577 -0.34764372 1.021470502 #> [6,] 0.826204606 0.60802216 -1.086001903 -1.70425199 0.531681619 #> [7,] -0.644199132 0.27171648 1.659940140 0.00592137 -2.916397580 #> [8,] -2.480460439 0.12577096 -1.451627735 -0.49797340 0.509201411 #> [9,] 0.645972561 1.21864386 0.006034893 2.20598272 1.314821123 #> [10,] 1.420356066 1.88378295 -0.439187745 -2.04023503 -0.979274100 #> [11,] 0.938259666 0.81136603 -0.527530743 0.39957106 0.125450758 #> [12,] 0.659106074 -0.85064522 -0.455311875 -0.91038086 1.441532534 #> [13,] 0.562735912 -0.15761641 0.153690287 0.91405044 2.460505126 #> [14,] -0.236777076 0.98343680 0.067053917 0.29608751 0.086055438 #> [15,] -0.364647140 -0.14207434 -0.432298923 0.47014927 0.932662511 #> [16,] -0.956270296 -1.72413617 0.929818879 -0.90786332 1.477602390 #> [17,] 1.159262652 2.15117572 -0.740966600 -1.43940451 0.936619944 #> [18,] 1.169457959 -0.58589266 -0.709161402 0.84062643 -1.852490968 #> [19,] 0.968184800 0.88418800 0.086586978 1.09275406 -1.061354651 #> [20,] -0.093876209 0.26108620 -0.308724493 0.29703432 -1.517906447 #> [21,] 1.082391874 -0.84998559 0.003422247 1.11125129 -0.015078419 #> [22,] -1.342808204 0.77312679 -0.560244087 0.03321846 0.351726465 #> [23,] -0.466176206 1.33664992 0.322718866 1.28693189 -0.132577357 #> [24,] 1.835950372 -0.79554991 0.731143021 0.23315852 -0.142410647 #> [25,] 0.894731625 -0.51173752 -1.072205409 -1.43469565 -0.306580501 #> [26,] -0.539486921 -0.14454293 -0.240279155 -0.76701050 0.489799387 #> [27,] -2.211144504 -0.56944115 1.419203482 -0.50582064 -0.492532647 #> [28,] 1.060024392 -1.12362159 0.065918416 0.25190666 0.288251624 #> [29,] -1.800302573 -1.21089197 -0.967711406 0.07854717 -0.834354632 #> [30,] 0.185380105 -1.15104751 1.209206538 0.79516028 1.775638179 #> [31,] 0.309950149 0.15145734 -1.464733152 -1.14880154 -1.106346088 #> [32,] -1.333843981 -0.22434625 -0.684753091 1.31404857 -0.635916525 #> [33,] 0.575707993 2.25220980 0.107242056 -0.09727769 -0.509944826 #> [34,] -0.249770715 -0.74048936 -2.035821613 0.93693236 0.135309495 #> [35,] 1.394375586 1.14977153 0.107948125 0.17865967 -0.561626753 #> [36,] 0.362748507 -0.56962292 1.612345786 0.92884940 -0.234221051 #> [37,] 1.960884744 -1.02645846 0.616315168 -0.92894040 1.485395178 #> [38,] -1.591337369 -1.02533776 -0.803697705 -1.11816712 -0.153449573 #> [39,] 0.740187600 0.25284442 0.407463986 -1.67782305 -0.699452356 #> [40,] 0.515750193 -0.59081765 1.018625391 0.31000583 -0.841347076 #> [41,] 0.664633361 -1.54392806 0.302188348 0.15208924 -1.105370344 #> [42,] -1.199331283 0.69077664 1.875077603 -1.19614820 0.194565676 #> [43,] -0.554893654 -1.65309704 0.216871733 -0.50361273 -0.004796167 #> [44,] -0.002608367 1.53565767 -0.268179594 1.09359224 -0.148673186 #> [45,] -0.578691955 0.16404284 0.662119571 0.25388872 -0.064012620 #> [46,] -1.209833334 0.15357833 -0.729807181 2.35302061 -1.111085291 #> [47,] -0.628683308 0.44060434 -0.807233753 -0.34701300 1.300059623 #> [48,] -1.225064943 0.63180371 -1.190044451 -1.38125249 0.133363572 #> [49,] 0.338234953 -0.02713710 -0.286702217 -1.32239943 1.154955730 #> [50,] -0.035575526 -1.25520770 1.852951080 -0.08683677 0.529564603 #> [51,] -0.363327699 0.32371409 0.898259377 -0.02109316 -0.542179240 #> [52,] 1.155129276 -0.52313861 -0.256709046 0.02073611 -0.781327023 #> [53,] 0.878615134 -2.06318718 -1.499283358 -0.11823604 -0.611242713 #> [54,] 1.558383895 0.16827135 0.205313192 0.44154858 -0.297933087 #> [55,] -0.615722646 0.07873155 2.116795945 -0.35003169 0.366459345 #> [56,] 0.407977002 -1.15771418 -1.062910934 0.69298411 -1.173491260 #> [57,] -0.028275412 0.60671951 -1.423079775 2.19533374 2.654308835 #> [58,] -0.687616144 0.20394080 0.450771090 1.52128425 0.118308399 #> [59,] -1.209824603 0.18341182 -2.193916464 -0.68677994 -0.065645645 #> [60,] -0.720704913 0.57964998 0.968677956 -0.80532764 -0.771059646 #> [,6] #> [1,] 0.65578960 #> [2,] 1.46319495 #> [3,] 0.78313948 #> [4,] 0.65882853 #> [5,] 1.45939792 #> [6,] 0.33075567 #> [7,] -0.01603112 #> [8,] -1.61693783 #> [9,] -0.30366937 #> [10,] 0.96322950 #> [11,] -2.43904804 #> [12,] -1.26988347 #> [13,] 0.08409906 #> [14,] 0.44059591 #> [15,] 0.35453621 #> [16,] -0.01846897 #> [17,] 1.13652068 #> [18,] -0.78668239 #> [19,] -1.32701039 #> [20,] 0.45177152 #> [21,] -0.89225343 #> [22,] 1.65049880 #> [23,] 0.81841906 #> [24,] -0.31813261 #> [25,] 1.33866888 #> [26,] 1.98624788 #> [27,] 0.57093589 #> [28,] 0.57603870 #> [29,] -0.52475298 #> [30,] 0.49925396 #> [31,] 0.21045308 #> [32,] 0.10634220 #> [33,] -0.21909774 #> [34,] -0.88633420 #> [35,] -0.05440577 #> [36,] 0.42691761 #> [37,] -0.95446878 #> [38,] -0.22537346 #> [39,] -1.52683939 #> [40,] -1.12745698 #> [41,] 0.19383030 #> [42,] -1.37104571 #> [43,] 1.09762771 #> [44,] 0.09570816 #> [45,] 0.13055466 #> [46,] 1.20717969 #> [47,] -1.22105192 #> [48,] 0.42222230 #> [49,] 0.25962501 #> [50,] -1.11940750 #> [51,] -0.46054496 #> [52,] 0.14737129 #> [53,] 1.40239922 #> [54,] -0.21243377 #> [55,] -0.40186671 #> [56,] 1.20636952 #> [57,] 0.69714457 #> [58,] -1.34487911 #> [59,] -2.60888434 #> [60,] -0.57870657