# Obtain WMT-2 data
wmt <- wmt2[,7:24]
# Draw random samples of 300 cases
sample1 <- wmt[sample(1:nrow(wmt), 300),]
sample2 <- wmt[sample(1:nrow(wmt), 300),]
# Estimate EGAs
ega1 <- EGA(sample1)
ega2 <- EGA(sample2)
# \donttest{
# Compare EGAs via plot
compare.EGA.plots(
ega1, ega2,
base = 1, # use "ega1" as base for comparison
labels = c("Sample 1", "Sample 2"),
rows = 1, columns = 2
)
# Change layout to circle plots
compare.EGA.plots(
ega1, ega2,
labels = c("Sample 1", "Sample 2"),
mode = "circle"
)# }
Run the code above in your browser using DataLab