Although the print.psych function will sort factor analysis loadings, sometimes it is useful to do this outside of the print function. fa.sort takes the output from the fa or principal functions and sorts the loadings for each factor. Items are located in terms of their greatest loading. The new order is returned as an element in the fa list. fa.organize allows for the columns or rows to be reorganized.

fa.sort(fa.results,polar=FALSE)
fa.organize(fa.results,o=NULL,i=NULL,cn=NULL,echelon=TRUE,flip=TRUE)

Arguments

fa.results

The output from a factor analysis or principal components analysis using fa or principal. Can also just be a matrix of loadings. Can also organize the output of cluster loadings from iclust.

polar

Sort by polar coordinates of first two factors (FALSE)

o

The order in which to order the factors

i

The order in which to order the items

cn

new factor names

echelon

Organize the factors so that they are in echelon form (variable 1 .. n on factor 1, n+1 ...n=k on factor 2, etc.)

flip

Flip factor loadings such that the colMean is positive.

Details

The fa.results$loadings are replaced with sorted loadings.

fa.organize takes a factor analysis or components output and reorganizes the factors in the o order. Items are organized in the i order. This is useful when comparing alternative factor solutions.

The flip option works only for the case of matrix input, not for full fa objects. Use the reflect function.

Value

A sorted factor analysis, principal components analysis, or omega loadings matrix.

These sorted values are used internally by the various diagram functions.

The values returned are the same as fa, except in sorted order. In addition, the order is returned as an additional element in the fa list.

Author

William Revelle

See also

Examples

test.simple <- fa(sim.item(16),2)
fa.sort(test.simple)
#> Factor Analysis using method =  minres
#> Call: fa(r = sim.item(16), nfactors = 2)
#> Standardized loadings (pattern matrix) based upon correlation matrix
#>       MR1   MR2   h2   u2 com
#> V12  0.68  0.03 0.46 0.54   1
#> V11  0.65  0.00 0.42 0.58   1
#> V4  -0.64 -0.01 0.41 0.59   1
#> V2  -0.60 -0.04 0.37 0.63   1
#> V1  -0.60  0.03 0.36 0.64   1
#> V10  0.57 -0.04 0.33 0.67   1
#> V3  -0.56  0.04 0.32 0.68   1
#> V9   0.55  0.00 0.30 0.70   1
#> V16  0.01  0.64 0.41 0.59   1
#> V8  -0.05 -0.63 0.41 0.59   1
#> V7   0.00 -0.62 0.39 0.61   1
#> V14  0.01  0.60 0.36 0.64   1
#> V15  0.02  0.59 0.35 0.65   1
#> V13 -0.06  0.59 0.34 0.66   1
#> V6   0.04 -0.56 0.31 0.69   1
#> V5   0.00 -0.51 0.26 0.74   1
#> 
#>                        MR1  MR2
#> SS loadings           2.96 2.82
#> Proportion Var        0.19 0.18
#> Cumulative Var        0.19 0.36
#> Proportion Explained  0.51 0.49
#> Cumulative Proportion 0.51 1.00
#> 
#>  With factor correlations of 
#>      MR1  MR2
#> MR1 1.00 0.07
#> MR2 0.07 1.00
#> 
#> Mean item complexity =  1
#> Test of the hypothesis that 2 factors are sufficient.
#> 
#> df null model =  120  with the objective function =  3.11 with Chi Square =  1531.41
#> df of  the model are 89  and the objective function was  0.15 
#> 
#> The root mean square of the residuals (RMSR) is  0.02 
#> The df corrected root mean square of the residuals is  0.03 
#> 
#> The harmonic n.obs is  500 with the empirical chi square  70.04  with prob <  0.93 
#> The total n.obs was  500  with Likelihood Chi Square =  74.82  with prob <  0.86 
#> 
#> Tucker Lewis Index of factoring reliability =  1.014
#> RMSEA index =  0  and the 90 % confidence intervals are  0 0.014
#> BIC =  -478.28
#> Fit based upon off diagonal values = 0.99
#> Measures of factor score adequacy             
#>                                                    MR1  MR2
#> Correlation of (regression) scores with factors   0.91 0.90
#> Multiple R square of scores with factors          0.83 0.82
#> Minimum correlation of possible factor scores     0.66 0.63
fa.organize(test.simple,c(2,1))  #the factors but not the items have been rearranged
#> Factor Analysis using method =  minres
#> Call: fa(r = sim.item(16), nfactors = 2)
#> Standardized loadings (pattern matrix) based upon correlation matrix
#>       MR2   MR1   h2   u2 com
#> V1   0.03 -0.60 0.36 0.64   1
#> V2  -0.04 -0.60 0.37 0.63   1
#> V3   0.04 -0.56 0.32 0.68   1
#> V4  -0.01 -0.64 0.41 0.59   1
#> V5  -0.51  0.00 0.26 0.74   1
#> V6  -0.56  0.04 0.31 0.69   1
#> V7  -0.62  0.00 0.39 0.61   1
#> V8  -0.63 -0.05 0.41 0.59   1
#> V9   0.00  0.55 0.30 0.70   1
#> V10 -0.04  0.57 0.33 0.67   1
#> V11  0.00  0.65 0.42 0.58   1
#> V12  0.03  0.68 0.46 0.54   1
#> V13  0.59 -0.06 0.34 0.66   1
#> V14  0.60  0.01 0.36 0.64   1
#> V15  0.59  0.02 0.35 0.65   1
#> V16  0.64  0.01 0.41 0.59   1
#> 
#>                        MR2  MR1
#> SS loadings           2.82 2.96
#> Proportion Var        0.18 0.19
#> Cumulative Var        0.18 0.36
#> Proportion Explained  0.49 0.51
#> Cumulative Proportion 0.49 1.00
#> 
#>  With factor correlations of 
#>      MR2  MR1
#> MR2 1.00 0.07
#> MR1 0.07 1.00
#> 
#> Mean item complexity =  1
#> Test of the hypothesis that 2 factors are sufficient.
#> 
#> df null model =  120  with the objective function =  3.11 with Chi Square =  1531.41
#> df of  the model are 89  and the objective function was  0.15 
#> 
#> The root mean square of the residuals (RMSR) is  0.02 
#> The df corrected root mean square of the residuals is  0.03 
#> 
#> The harmonic n.obs is  500 with the empirical chi square  70.04  with prob <  0.93 
#> The total n.obs was  500  with Likelihood Chi Square =  74.82  with prob <  0.86 
#> 
#> Tucker Lewis Index of factoring reliability =  1.014
#> RMSEA index =  0  and the 90 % confidence intervals are  0 0.014
#> BIC =  -478.28
#> Fit based upon off diagonal values = 0.99
#> Measures of factor score adequacy             
#>                                                    MR2  MR1
#> Correlation of (regression) scores with factors   0.90 0.91
#> Multiple R square of scores with factors          0.82 0.83
#> Minimum correlation of possible factor scores     0.63 0.66