View source: R/plot.efa_compare.R
| plot.efa_compare | R Documentation |
Plot method for the efa_compare() function showing the distribution of the
absolute differences between the two compared objects as a violin plot with
jittered points. Differences above the threshold are highlighted.
## S3 method for class 'efa_compare'
plot(x, plot_red = NULL, ...)
x |
list. An object of class |
plot_red |
numeric or |
... |
not used. |
A ggplot object showing the absolute differences, with differences
above plot_red highlighted in red.
# A type SPSS EFA to mimick the SPSS implementation
EFA_SPSS_5 <- efa_fit(IDS2_R, n_factors = 5,
estimate_control = estimate_control(type = "SPSS"),
rotate_control = rotate_control(type = "SPSS"))
# A type psych EFA to mimick the psych::fa() implementation
EFA_psych_5 <- efa_fit(IDS2_R, n_factors = 5,
estimate_control = estimate_control(type = "psych"),
rotate_control = rotate_control(type = "psych"))
# compare the two and plot the differences
comp <- efa_compare(EFA_SPSS_5$unrot_loadings, EFA_psych_5$unrot_loadings,
x_labels = c("SPSS", "psych"))
plot(comp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.