print() shows a concise overview of an efa_fit() or efa_mi() solution:
a model header, the loading matrix (with the factor intercorrelations for
oblique solutions), the variances accounted for, and the model fit.
summary() returns a summary.efa object whose print method adds the full
diagnostics: model and simple-structure diagnostics, confidence-interval
tables, the structure matrix, multiple-imputation uncertainty (for pooled
objects), and residual diagnostics. 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 (for example when captured into a file or stripped with
cli::ansi_strip()).
# S3 method for efa
print(x, ...)# S3 method for efa_mi
print(x, ...)
# S3 method for efa
format(
x,
cutoff = 0.3,
digits = 3,
max_name_length = 10,
sort_loadings = c("none", "primary", "clustered"),
show_loading_legend = TRUE,
max_factors_per_block = NULL,
...
)
# S3 method for efa_mi
format(x, ...)
# S3 method for efa
summary(
object,
cutoff = 0.3,
digits = 3,
max_name_length = 10,
ci = c("auto", "none", "separate"),
ci_filter = c("salient", "all", "nonzero"),
diagnostics_top_n = 10,
residual_cutoff = 0.1,
residual_top_n = 10,
show_structure = TRUE,
sort_loadings = c("none", "primary", "clustered"),
show_loading_legend = TRUE,
cross_loading_cutoff = cutoff,
min_primary_gap = 0.2,
min_salient_per_factor = 3,
max_factors_per_block = NULL,
show_mi_diagnostics = NULL,
...
)
# S3 method for efa_mi
summary(object, ...)
# S3 method for summary.efa
print(x, ...)
# S3 method for summary.efa
format(x, ...)
print() and the print method for summary.efa objects return their
argument invisibly. format() returns a character vector with the report
lines. summary() returns an object of class summary.efa.
An object of class efa (from efa_fit()) or efa_mi (from efa_mi()); for
the summary.efa methods, the object returned by summary().
Further arguments passed to print.efa_loadings().
numeric. The absolute value at or above which loadings are emphasised in the loading table. Default is .3.
numeric. Number of decimal places for the printed tables. Default is 3.
numeric. Maximum length of the variable names to
display; longer names are cut from the right, or abbreviated where cutting
would give two variables the same label. Applies to every table that names
variables. name_style (see print.efa_loadings()) can be passed through
... to choose the shortening explicitly, but it reaches the loading table
only; the confidence-interval and simple-structure tables always shorten by
cutting.
character. Optional row sorting for the loading table.
See print.efa_loadings().
logical. Whether to print a short legend for the
loading-table styling. Default is TRUE. The legend is only printed when
that styling is actually rendered (a colour-capable console); in plain
output it is omitted and this argument has no effect.
numeric or NULL. Maximum number of factor
columns per loading-table block. If NULL, chosen from the console width.
character. Which confidence intervals summary() shows, if
available. "auto" and "separate" print CI sections when CIs were
computed; "none" suppresses them. Default is "auto".
character. Which loading CIs summary() prints: "salient"
(default), "all", or "nonzero"; see Details.
numeric. Maximum number of item-level entries
summary() prints per simple-structure diagnostic.
numeric. Absolute residual cutoff for the residual
diagnostics in summary(). Default is .1.
numeric. Maximum number of residuals summary() prints.
Use Inf to print all residuals above residual_cutoff.
logical. Whether summary() prints the structure matrix
for oblique solutions when available. Default is TRUE.
numeric. Cutoff for counting cross-loadings in the
summary() diagnostics. Defaults to cutoff.
numeric. Minimum desired absolute difference between the
largest and second-largest absolute loading of an item, used in the
summary() diagnostics.
numeric. Minimum number of salient indicators per
factor used in the summary() diagnostics. Default is 3.
logical or NULL. Whether summary() prints a
multiple-imputation uncertainty summary for pooled EFAs. NULL shows it for
pooled objects.
The methods are shared by single-imputation efa objects and pooled
efa_mi objects. For efa_mi objects the header reports the number
of imputations and the alignment/pooling settings; confidence intervals and a
multiple-imputation uncertainty summary are shown by summary() when the
pooled object carries bootstrap/MI quantities.
In summary(), ci_filter controls which loading intervals are shown:
"salient" reports intervals for loadings whose absolute point estimate is at
least cutoff, "nonzero" reports intervals excluding zero, and "all"
reports every finite interval.
mod <- efa_fit(test_models$baseline$cormat, n_factors = 3, N = 500,
estimator = "PAF", rotation = "promax")
mod
# The full diagnostics, CI tables, and residual diagnostics:
summary(mod)
# format() returns the same lines as a character vector, e.g. for a report file:
writeLines(format(mod))
Run the code above in your browser using DataLab