The basic factor or principal components model is that a correlation or covariance matrix may be reproduced by the product of a factor loading matrix times its transpose. Find the residuals of the original minus the reproduced matrix. Used by factor.fit, VSS, ICLUST, etc.

factor.residuals(r, f)

Arguments

r

A correlation matrix

f

A factor model matrix or a list of class loadings

Details

The basic factor equation is \(_nR_n \approx _{n}F_{kk}F_n'+ U^2\). Residuals are just R* = R - F'F. The residuals should be (but in practice probably rarely are) examined to understand the adequacy of the factor analysis. When doing Factor analysis or Principal Components analysis, one usually continues to extract factors/components until the residuals do not differ from those expected from a random matrix.

Value

rstar is the residual correlation matrix.

Author

Maintainer: William Revelle <revelle@northwestern.edu>

See also

Examples

fa2 <- fa(Harman74.cor$cov,2,rotate=TRUE)
#> Specified rotation not found, rotate='none' used
 fa2resid <- factor.residuals(Harman74.cor$cov,fa2)
 fa2resid[1:4,1:4] #residuals with two factors extracted
#>                  VisualPerception      Cubes PaperFormBoard      Flags
#> VisualPerception        0.6533350 0.10174203      0.1656341 0.19205836
#> Cubes                   0.1017420 0.86326270      0.1638187 0.05229164
#> PaperFormBoard          0.1656341 0.16381874      0.8232249 0.10052094
#> Flags                   0.1920584 0.05229164      0.1005209 0.76340745
 fa4 <- fa(Harman74.cor$cov,4,rotate=TRUE)
#> Specified rotation not found, rotate='none' used
#> Warning: NaNs produced
 fa4resid <- factor.residuals(Harman74.cor$cov,fa4)
 fa4resid[1:4,1:4] #residuals with 4 factors extracted
#>                  VisualPerception       Cubes PaperFormBoard       Flags
#> VisualPerception       0.44982015 -0.03531402    -0.01016952  0.04145577
#> Cubes                 -0.03531402  0.77015627     0.04339997 -0.04969772
#> PaperFormBoard        -0.01016952  0.04339997     0.66152929 -0.02945683
#> Flags                  0.04145577 -0.04969772    -0.02945683  0.65020432