# itemStability: Item Stability Statistics from 'bootEGA' In EGAnet: Exploratory Graph Analysis - A Framework for Estimating the Number of Dimensions in Multivariate Data Using Network Psychometrics

## Description

Based on the `bootEGA` results, this function computes and plots the number of times an item (variable) is estimated in the same factor/dimension as originally estimated by `EGA` (`item.replication`). The output also contains each item's replication frequency (i.e., proportion of bootstraps that an item appeared in each dimension; `item.dim.rep`) as well as the average network loading for each item in each dimension (`item.loadings`).

## Usage

 `1` ```itemStability(bootega.obj, orig.wc, item.freq = 0.1, plot.item.rep = 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.freq` A value for lowest frequency allowed in `item.dim.rep` output. Removes noise from table to allow for easier interpretation. Defaults to `.10` `plot.item.rep` Should the plot be produced for `item.replication`? If `TRUE`, then a plot for the `item.replication` output will be produced. Defaults to `TRUE`

## Value

Returns a list containing:

 `item.replication` The proportion of times each item replicated within the defined dimension `mean.dim.rep` The average replication proportion of items replicating in each dimension. More simply, the average of the `item.replication` output for each dimension `item.dim.rep` The proportion of times each item replicated within each possible dimension. Dimensions greater than the maximum number used in the `orig.wc` argument are labeled based on the largest remaining components after the dimensions used to `orig.wc` `item.loadings` Matrix of the average standardized network loading (computed using `net.loads`) for each item in each dimension `wc` A matrix containing the community membership values for each bootstrapped sample. The values correspond to the values input for the `orig.wc` argument `plot.itemStability` A plot of the number of times each item replicates in its original community membership (`orig.wc`)

## Author(s)

Hudson Golino <hfg9s at virginia.edu> and Alexander P. Christensen <alexpaulchristensen@gmail.com>

## References

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

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

`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.
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30``` ```# Load data wmt <- wmt2[,7:24] # 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, iter = 100, typicalStructure = TRUE, plot.typicalStructure = TRUE, model = "glasso", plot.type = "qgraph", type = "parametric", ncores = 2) # Estimate item stability statistics res <- itemStability(boot.wmt, orig.wc = ega.wmt\$wc) # Changing plot features (ggplot2) ## Changing colors (ignore warnings) ### qgraph Defaults res\$plot.itemStability + ggplot2::scale_color_manual(values = rainbow(max(res\$uniq.num))) ### Pastel res\$plot.itemStability + ggplot2::scale_color_brewer(palette = "Pastel1") ## Changing Legend (ignore warnings) res\$plot.itemStability + ggplot2::scale_color_discrete(labels = "Intelligence") ```