Skip to contents

print() shows the result of efa_procrustes(): the alignment method, the target criterion at the solution, and the aligned loadings. For oblique alignment, it also shows the convergence and the factor intercorrelations. format() assembles the same report and returns it as a character vector; print() is cat(format(x), sep = "\n"). The lines follow the active console theme, so they are plain when colours are disabled.

Usage

# S3 method for class 'efa_procrustes'
print(x, digits = 3, ...)

# S3 method for class 'efa_procrustes'
format(x, digits = 3, ...)

Arguments

x

An object of class efa_procrustes (output from efa_procrustes()).

digits

numeric. The number of decimals to show. Default is 3.

...

Further arguments passed to format.efa_loadings() for the loading table, for example cutoff.

Value

print() returns its argument x invisibly. format() returns a character vector with the report lines.

Examples

efa_mod <- efa_fit(test_models$baseline$cormat, N = 500, n_factors = 3,
                   rotation = "none")
pr <- efa_procrustes(efa_mod$unrot_loadings, population_models$loadings$baseline,
                     rotation = "oblique")
pr
#> 
#> ── Procrustes rotation ─────────────────────────────────────────────────────────
#> 
#> Method: oblique
#> Target criterion: 0.173
#> ✔ Converged after 10 iterations.
#> 
#> ── Aligned loadings ────────────────────────────────────────────────────────────
#> 
#>        F1     F2     F3
#> V1    .619   .052  -.074
#> V2    .486   .080  -.021
#> V3    .457   .067   .041
#> V4    .558   .003   .079
#> V5    .445  -.011   .140
#> V6    .713  -.031  -.102
#> V7    .080   .546  -.005
#> V8    .016   .593  -.020
#> V9   -.015   .560   .036
#> V10  -.090   .686  -.022
#> V11   .226   .369   .004
#> V12  -.027   .663   .018
#> V13  -.064   .076   .620
#> V14   .095  -.076   .547
#> V15  -.069   .120   .566
#> V16   .098  -.058   .554
#> V17  -.021  -.049   .668
#> V18   .055  -.003   .555
#> 
#> ── Factor Intercorrelations ────────────────────────────────────────────────────
#> 
#>       F1     F2     F3
#> F1  1.000
#> F2   .643  1.000
#> F3   .666   .635  1.000

# format() returns the same lines as a character vector:
writeLines(format(pr))
#> 
#> ── Procrustes rotation ─────────────────────────────────────────────────────────
#> 
#> Method: oblique
#> Target criterion: 0.173
#> ✔ Converged after 10 iterations.
#> 
#> ── Aligned loadings ────────────────────────────────────────────────────────────
#> 
#>        F1     F2     F3
#> V1    .619   .052  -.074
#> V2    .486   .080  -.021
#> V3    .457   .067   .041
#> V4    .558   .003   .079
#> V5    .445  -.011   .140
#> V6    .713  -.031  -.102
#> V7    .080   .546  -.005
#> V8    .016   .593  -.020
#> V9   -.015   .560   .036
#> V10  -.090   .686  -.022
#> V11   .226   .369   .004
#> V12  -.027   .663   .018
#> V13  -.064   .076   .620
#> V14   .095  -.076   .547
#> V15  -.069   .120   .566
#> V16   .098  -.058   .554
#> V17  -.021  -.049   .668
#> V18   .055  -.003   .555
#> 
#> ── Factor Intercorrelations ────────────────────────────────────────────────────
#> 
#>       F1     F2     F3
#> F1  1.000
#> F2   .643  1.000
#> F3   .666   .635  1.000