# NOT RUN {
# Load data
wmt <- wmt2[,7:24]
# }
# NOT RUN {
# Estimate EGA network
## plot.type = "qqraph" used for CRAN checks
## plot.type = "GGally" is the default
ega.wmt <- EGA(data = wmt, model = "glasso", plot.type = "qgraph")
# Estimate dimension stability
boot.wmt <- bootEGA(data = wmt, uni = TRUE, iter = 500, typicalStructure = TRUE,
plot.typicalStructure = TRUE, model = "glasso", plot.type = "qgraph",
type = "parametric", ncores = 2)
# }
# NOT RUN {
# Estimate item stability statistics
res <- dimStability(boot.wmt, orig.wc = ega.wmt$wc, item.stability = TRUE)
res
# Changing plot features (ggplot2)
## Changing colors (ignore warnings)
### qgraph Defaults
res$items$plot.itemStability +
ggplot2::scale_color_manual(values = rainbow(max(res$items$uniq.num)))
### Pastel
res$items$plot.itemStability +
ggplot2::scale_color_brewer(palette = "Pastel1")
## Changing Legend (ignore warnings)
res$items$plot.itemStability +
ggplot2::scale_color_discrete(labels = "Intelligence")
# }
Run the code above in your browser using DataLab