Skip to contents

Returns the residual correlation matrix of an efa_fit() or efa_mi() solution. Residuals are a pure extractor here; their diagnostics and a formatted display are part of summary() of the efa object.

Usage

# S3 method for class 'efa'
residuals(object, type = c("raw", "standardized"), ...)

Arguments

object

a list of class efa. Output from efa_fit() or efa_mi().

type

character. Which residuals to return. "raw" (default) returns orig_R - model_implied_R; "standardized" returns the standardized residuals (residuals divided by their standard errors), available only when the object was fitted with bootstrap standard errors.

...

Further arguments (currently unused).

Value

A numeric matrix of residual correlations.

Examples

efa <- efa_fit(test_models$baseline$cormat, n_factors = 3, N = 500)
residuals(efa)
#>               V1            V2           V3           V4            V5
#> V1   0.000000000 -0.0096803522 -0.039772126  0.028066822  0.0230472687
#> V2  -0.009680352  0.0000000000  0.034710087 -0.029503531  0.0003604831
#> V3  -0.039772126  0.0347100867  0.000000000 -0.033986378  0.0042891765
#> V4   0.028066822 -0.0295035311 -0.033986378  0.000000000  0.0513975327
#> V5   0.023047269  0.0003604831  0.004289176  0.051397533  0.0000000000
#> V6   0.018651352  0.0055878934  0.016798623 -0.014142673 -0.0501478048
#> V7  -0.030411777 -0.0052650806  0.069488212  0.019404841 -0.0323005375
#> V8   0.038708943  0.0047382384 -0.043050627  0.016961743 -0.0174096565
#> V9   0.049824699 -0.0386812463 -0.024150923 -0.004831697 -0.0157568847
#> V10  0.026544156 -0.0190834494 -0.044560937 -0.003258236 -0.0046928313
#> V11 -0.054254373  0.0119493975  0.007763988 -0.009653115 -0.0075637107
#> V12 -0.047208905  0.0389761670  0.047245577 -0.016557252  0.0467253805
#> V13  0.004946583  0.0354255964  0.008064584 -0.012920393 -0.0019985601
#> V14 -0.027232322  0.0549557025 -0.013808357  0.005942186  0.0151686413
#> V15  0.008543161  0.0154589419 -0.027311283  0.025443621  0.0430996432
#> V16  0.023183146 -0.0100050662  0.018698969  0.001675323 -0.0495994365
#> V17 -0.018010956 -0.0376422367 -0.004709116 -0.010896425 -0.0381149278
#> V18  0.008143871 -0.0523347358  0.019642330 -0.014823798  0.0234271018
#>                V6           V7            V8           V9           V10
#> V1   0.0186513523 -0.030411777  0.0387089429  0.049824699  0.0265441558
#> V2   0.0055878934 -0.005265081  0.0047382384 -0.038681246 -0.0190834494
#> V3   0.0167986227  0.069488212 -0.0430506268 -0.024150923 -0.0445609375
#> V4  -0.0141426726  0.019404841  0.0169617425 -0.004831697 -0.0032582358
#> V5  -0.0501478048 -0.032300538 -0.0174096565 -0.015756885 -0.0046928313
#> V6   0.0000000000 -0.011586306 -0.0166885727  0.004155845  0.0311459669
#> V7  -0.0115863059  0.000000000  0.0187368185  0.006411012 -0.0284952529
#> V8  -0.0166885727  0.018736818  0.0000000000 -0.006845566 -0.0047800634
#> V9   0.0041558451  0.006411012 -0.0068455664  0.000000000  0.0257977555
#> V10  0.0311459669 -0.028495253 -0.0047800634  0.025797755  0.0000000000
#> V11  0.0421741243 -0.002025041  0.0226871040  0.016380680 -0.0232869256
#> V12 -0.0265666602  0.006325293 -0.0223573935 -0.022574125  0.0230578178
#> V13 -0.0280233013  0.003970767 -0.0212166391  0.004871833 -0.0340382241
#> V14 -0.0007701565 -0.018643693 -0.0367239427  0.057365565  0.0336113604
#> V15 -0.0230871432 -0.023386108  0.0269276753 -0.020450801  0.0424522570
#> V16  0.0116491563 -0.002146784 -0.0004274249 -0.014166357 -0.0006502678
#> V17  0.0593845369  0.021633271  0.0274661261  0.012971542 -0.0299208695
#> V18 -0.0107337669  0.006723775  0.0082444908 -0.028836353  0.0089879282
#>               V11           V12          V13           V14          V15
#> V1  -0.0542543734 -0.0472089048  0.004946583 -0.0272323222  0.008543161
#> V2   0.0119493975  0.0389761670  0.035425596  0.0549557025  0.015458942
#> V3   0.0077639877  0.0472455766  0.008064584 -0.0138083573 -0.027311283
#> V4  -0.0096531152 -0.0165572516 -0.012920393  0.0059421857  0.025443621
#> V5  -0.0075637107  0.0467253805 -0.001998560  0.0151686413  0.043099643
#> V6   0.0421741243 -0.0265666602 -0.028023301 -0.0007701565 -0.023087143
#> V7  -0.0020250408  0.0063252935  0.003970767 -0.0186436928 -0.023386108
#> V8   0.0226871040 -0.0223573935 -0.021216639 -0.0367239427  0.026927675
#> V9   0.0163806798 -0.0225741245  0.004871833  0.0573655646 -0.020450801
#> V10 -0.0232869256  0.0230578178 -0.034038224  0.0336113604  0.042452257
#> V11  0.0000000000 -0.0005479184  0.019604838 -0.0394644498 -0.053129844
#> V12 -0.0005479184  0.0000000000  0.024200864 -0.0117597431 -0.002750939
#> V13  0.0196048379  0.0242008642  0.000000000 -0.0433536640  0.012033446
#> V14 -0.0394644498 -0.0117597431 -0.043353664  0.0000000000  0.007806839
#> V15 -0.0531298437 -0.0027509395  0.012033446  0.0078068386  0.000000000
#> V16 -0.0063864966  0.0091005183  0.023875300 -0.0124546520  0.010998058
#> V17  0.0181598589 -0.0196508342  0.001347489  0.0230878081 -0.011138788
#> V18  0.0581555046 -0.0189695413  0.000528876  0.0164388922 -0.029466178
#>               V16          V17          V18
#> V1   0.0231831459 -0.018010956  0.008143871
#> V2  -0.0100050662 -0.037642237 -0.052334736
#> V3   0.0186989685 -0.004709116  0.019642330
#> V4   0.0016753231 -0.010896425 -0.014823798
#> V5  -0.0495994365 -0.038114928  0.023427102
#> V6   0.0116491563  0.059384537 -0.010733767
#> V7  -0.0021467839  0.021633271  0.006723775
#> V8  -0.0004274249  0.027466126  0.008244491
#> V9  -0.0141663566  0.012971542 -0.028836353
#> V10 -0.0006502678 -0.029920870  0.008987928
#> V11 -0.0063864966  0.018159859  0.058155505
#> V12  0.0091005183 -0.019650834 -0.018969541
#> V13  0.0238753000  0.001347489  0.000528876
#> V14 -0.0124546520  0.023087808  0.016438892
#> V15  0.0109980575 -0.011138788 -0.029466178
#> V16  0.0000000000 -0.004407682 -0.003954005
#> V17 -0.0044076825  0.000000000  0.009803628
#> V18 -0.0039540048  0.009803628  0.000000000