nice_loadings.RdCreates table of loadings of exploratory factor analysis based on the psych::fa function
nice_loadings(
x,
factor_names = NULL,
sort = TRUE,
cut = 0.2,
round = 2,
title = "Loading matrix",
footnote = NULL,
auto_labels = TRUE
)
nice_efa(..., file = NULL)Object returned from the psych::fa function.
A character vector with names for the resulting factors. If not provided, default names are chosen.
If TRUE, loadings are sorted.
Loadings below cut will be omitted in the resulting data frame.
Number of digits to round loadings (based on the base::round function)
Title for the resulting table.
A character vector with footnotes for the resulting table. If NULL, default footnotes are created.
If TRUE, automatic variable labels are used if available.
Arguments passed to nice_loadings().
If provided, the resulting table is also written to the specified file (e.g., an Excel file).
A data.frame
A nicely formatted table of loadings for exploratory factor analyses.
The resulting data frame contains the loadings, communalities, and
complexities for each variable, as well as the variance accounted for by
each factor. Loadings below the specified cut-off are omitted for better
readability.
The resulting data frame is decorated with attributes for use with the
wmisc::nice_table() function.
This function is also called by nice_efa(), which adds additional
formatting for exploratory factor analyses.
This function wraps nice_loadings() and adds additional formatting
for exploratory factor analyses, such as row groups and spanners.
wmisc:::mtcars_labeled |>
rename_from_labels() |>
psych::fa(nfactors = 2) |>
nice_efa()
#> Loading required namespace: GPArotation
Table
Loading matrix
MR1
MR2
Loadings
Variances
Note. Extraction method is minres. Rotation method is oblimin. RMSEA is 0.178 CI90% [0.121, 0.245]. Loadings below |0.2| are not displayed.
nice_efa(
wmisc:::data_emo_fa,
factor_names = c(
"Emotionserkennung", "Resilienz",
"Aufmerksamkeit", "Erklärung für Emotionen"
)
)
Table
Loading matrix
Emotionserkennung
Resilienz
Aufmerksamkeit
Erklärung für Emotionen
Loadings
Variances
Note. Extraction method is minres. Rotation method is oblimin. RMSEA is 0.079 CI90% [0.07, 0.088]. Loadings below |0.2| are not displayed.