Learn R Programming

EGAnet (version 0.9.8)

dimStability: Dimension Stability Statistics from bootEGA

Description

Based on the bootEGA results, this function computes the stability of dimensions. This is computed by assessing the proportion of times the original dimension is exactly replicated in across bootstrap samples

Usage

dimStability(bootega.obj, orig.wc, item.stability = TRUE)

Arguments

bootega.obj

A bootEGA object

orig.wc

Numeric or character. A vector with community numbers or labels for each item. Typically uses community results (wc) from EGA

item.stability

Boolean. Should the item stability statistics be computed using [EGAnet]{itemStability}? Defaults to TRUE

Value

When argument item.stability = TRUE, returns a list containing:

dimensions

The dimensional stability of each dimension

items

The output from itemStability

When argument item.stability = FALSE, returns a vector of the dimensional stability of each dimension

References

Christensen, A. P., & Golino, H. (2019). Estimating the stability of the number of factors via Bootstrap Exploratory Graph Analysis: A tutorial. PsyArXiv. 10.31234/osf.io/9deay

Christensen, A. P., Golino, H., & Silvia, P. J. (in press). A psychometric network perspective on the validity and validation of personality trait questionnaires. European Journal of Personality. 10.1002/per.2265

See Also

EGA to estimate the number of dimensions of an instrument using EGA and CFA to verify the fit of the structure suggested by EGA using confirmatory factor analysis.

Examples

Run this code
# 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