| efa_compare | R Documentation |
The function takes two objects of the same dimensions containing numeric
information (loadings or communalities) and returns a list of class
efa_compare containing summary information of the differences of the objects.
efa_compare(
x,
y,
reorder = c("congruence", "names", "none"),
corres = TRUE,
thresh = 0.3,
digits = 4,
m_red = 0.001,
range_red = 0.001,
round_red = 3,
print_diff = TRUE,
na.rm = FALSE,
x_labels = c("x", "y"),
plot = TRUE,
plot_red = 0.01
)
digits, m_red, range_red, round_red, print_diff, and plot_red
only control how the result is displayed; each is stored in the returned object's
settings and can be overridden later without recomputing the comparison –
digits, m_red, range_red, round_red, and print_diff in a call to
print.efa_compare(), and plot_red in a call to plot.efa_compare().
A list of class efa_compare with the following components:
diff |
The vector or matrix containing the differences between x and y. |
mean_abs_diff |
The mean absolute difference between x and y. |
median_abs_diff |
The median absolute difference between x and y. |
min_abs_diff |
The minimum absolute difference between x and y. |
max_abs_diff |
The maximum absolute difference between x and y. |
max_dec |
The maximum number of decimals to which a comparison makes sense. For example, if x contains only values up to the third decimals, and y is a normal double, max_dec will be three. |
are_equal |
The maximal number of decimals to which all elements of x and y
agree in absolute value. The comparison is on magnitudes, so two elements that
are equal in size but opposite in sign count as agreeing; signed disagreements
are reflected in |
diff_corres |
The number of differing variable-to-factor correspondences
between x and y, when only the highest loading is considered. |
diff_corres_cross |
The number of differing variable-to-factor correspondences
between x and y when all loadings |
g |
The root mean squared distance (RMSE) between x and y. |
settings |
List of the settings used. |
efa_fit() for the solutions being compared, and efa_procrustes() to rotate
one solution onto another before comparing.
# A type SPSS EFA to mimick the SPSS implementation
EFA_SPSS_6 <- efa_fit(test_models$case_11b$cormat, n_factors = 6,
estimate_control = estimate_control(type = "SPSS"),
rotate_control = rotate_control(type = "SPSS"))
# A type psych EFA to mimick the psych::fa() implementation
EFA_psych_6 <- efa_fit(test_models$case_11b$cormat, n_factors = 6,
estimate_control = estimate_control(type = "psych"),
rotate_control = rotate_control(type = "psych"))
# compare the two
efa_compare(EFA_SPSS_6$unrot_loadings, EFA_psych_6$unrot_loadings,
x_labels = c("SPSS", "psych"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.