# fa.sort: Sort factor analysis or principal components analysis... In psych: Procedures for Psychological, Psychometric, and Personality Research

## Description

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.

## Usage

 1 2 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. 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

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

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.

William Revelle

## Examples

 1 2 3 test.simple <- fa(sim.item(16),2) fa.sort(test.simple) fa.organize(test.simple,c(2,1)) #the factors but not the items have been rearranged

### Example output

Factor Analysis using method =  minres
Call: fa(r = sim.item(16), nfactors = 2)
MR1   MR2   h2   u2 com
V5  -0.66  0.05 0.44 0.56   1
V6  -0.63 -0.06 0.41 0.59   1
V13  0.63 -0.06 0.40 0.60   1
V7  -0.61  0.01 0.37 0.63   1
V16  0.60  0.07 0.38 0.62   1
V15  0.60  0.03 0.36 0.64   1
V8  -0.59  0.03 0.34 0.66   1
V14  0.58  0.00 0.34 0.66   1
V4   0.04  0.63 0.40 0.60   1
V2   0.03  0.62 0.39 0.61   1
V1  -0.01  0.59 0.35 0.65   1
V9   0.00 -0.59 0.35 0.65   1
V3  -0.01  0.58 0.34 0.66   1
V12  0.06 -0.58 0.34 0.66   1
V11  0.01 -0.58 0.34 0.66   1
V10  0.00 -0.58 0.33 0.67   1

MR1  MR2
Proportion Var        0.19 0.18
Cumulative Var        0.19 0.37
Proportion Explained  0.51 0.49
Cumulative Proportion 0.51 1.00

With factor correlations of
MR1  MR2
MR1 1.00 0.06
MR2 0.06 1.00

Mean item complexity =  1
Test of the hypothesis that 2 factors are sufficient.

The degrees of freedom for the null model are  120  and the objective function was  4.02 with Chi Square of  1980.33
The degrees of freedom for the model are 89  and the objective function was  0.16

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 number of observations is  500 with the empirical chi square  65.43  with prob <  0.97
The total number of observations was  500  with Likelihood Chi Square =  79.04  with prob <  0.77

Tucker Lewis Index of factoring reliability =  1.007
RMSEA index =  0  and the 90 % confidence intervals are  0 0.018
BIC =  -474.06
Fit based upon off diagonal values = 0.99
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
Factor Analysis using method =  minres
Call: fa(r = sim.item(16), nfactors = 2)
MR2   MR1   h2   u2 com
V1   0.59 -0.01 0.35 0.65   1
V2   0.62  0.03 0.39 0.61   1
V3   0.58 -0.01 0.34 0.66   1
V4   0.63  0.04 0.40 0.60   1
V5   0.05 -0.66 0.44 0.56   1
V6  -0.06 -0.63 0.41 0.59   1
V7   0.01 -0.61 0.37 0.63   1
V8   0.03 -0.59 0.34 0.66   1
V9  -0.59  0.00 0.35 0.65   1
V10 -0.58  0.00 0.33 0.67   1
V11 -0.58  0.01 0.34 0.66   1
V12 -0.58  0.06 0.34 0.66   1
V13 -0.06  0.63 0.40 0.60   1
V14  0.00  0.58 0.34 0.66   1
V15  0.03  0.60 0.36 0.64   1
V16  0.07  0.60 0.38 0.62   1

MR2  MR1
Proportion Var        0.18 0.19
Cumulative Var        0.18 0.37
Proportion Explained  0.49 0.51
Cumulative Proportion 0.49 1.00

With factor correlations of
MR2  MR1
MR2 1.00 0.06
MR1 0.06 1.00

Mean item complexity =  1
Test of the hypothesis that 2 factors are sufficient.

The degrees of freedom for the null model are  120  and the objective function was  4.02 with Chi Square of  1980.33
The degrees of freedom for the model are 89  and the objective function was  0.16

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 number of observations is  500 with the empirical chi square  65.43  with prob <  0.97
The total number of observations was  500  with Likelihood Chi Square =  79.04  with prob <  0.77

Tucker Lewis Index of factoring reliability =  1.007
RMSEA index =  0  and the 90 % confidence intervals are  0 0.018
BIC =  -474.06
Fit based upon off diagonal values = 0.99