Learn R Programming

EFAtools (version 0.8.0)

plot.COMPARE: Plot COMPARE object

Description

Plot method for the 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.

Usage

# S3 method for COMPARE
plot(x, ...)

Value

A ggplot object showing the absolute differences, with differences above plot_red highlighted in red.

Arguments

x

list. An object of class COMPARE (output from the COMPARE() function).

...

not used.

Examples

Run this code
# A type SPSS EFA to mimick the SPSS implementation
EFA_SPSS_5 <- EFA(IDS2_R, n_factors = 5, type = "SPSS")

# A type psych EFA to mimick the psych::fa() implementation
EFA_psych_5 <- EFA(IDS2_R, n_factors = 5, type = "psych")

# compare the two and plot the differences
comp <- COMPARE(EFA_SPSS_5$unrot_loadings, EFA_psych_5$unrot_loadings,
                x_labels = c("SPSS", "psych"))
plot(comp)

Run the code above in your browser using DataLab