invariance | R Documentation |
EGA
StructureEstimates configural invariance using bootEGA
on all data (across groups) first. After configural variance is established,
then metric invariance is tested using the community structure that established
configural invariance (see Details for more information on this process)
invariance(
data,
groups,
structure = NULL,
iter = 500,
configural.threshold = 0.7,
configural.type = c("parametric", "resampling"),
corr = c("auto", "cor_auto", "pearson", "spearman"),
na.data = c("pairwise", "listwise"),
model = c("BGGM", "glasso", "TMFG"),
algorithm = c("leiden", "louvain", "walktrap"),
uni.method = c("expand", "LE", "louvain"),
ncores,
seed = NULL,
verbose = TRUE,
...
)
data |
Matrix or data frame. Should consist only of variables to be used in the analysis |
groups |
Numeric or character vector (length = |
structure |
Numeric or character vector (length = |
iter |
Numeric (length = 1).
Number of iterations to perform for the permutation.
Defaults to |
configural.threshold |
Numeric (length = 1).
Value to use a threshold in |
configural.type |
Character (length = 1).
Type of bootstrap to use for configural invariance in |
corr |
Character (length = 1).
Method to compute correlations.
Defaults to
For other similarity measures, compute them first and input them
into |
na.data |
Character (length = 1).
How should missing data be handled?
Defaults to
|
model |
Character (length = 1).
Defaults to
|
algorithm |
Character or
|
uni.method |
Character (length = 1).
What unidimensionality method should be used?
Defaults to
|
ncores |
Numeric (length = 1).
Number of cores to use in computing results.
Defaults to If you're unsure how many cores your computer has,
then type: |
seed |
Numeric (length = 1).
Defaults to |
verbose |
Boolean (length = 1).
Should progress be displayed?
Defaults to |
... |
Additional arguments that can be passed on to
|
In traditional psychometrics, measurement invariance is performed in sequential testing from more flexible (more free parameters) to more rigid (fewer free parameters) structures. Measurement invariance in network psychometrics is no different.
Configural Invariance
To establish configural invariance, the data are collapsed across groups
and a common sample structure is identified used bootEGA
and itemStability
. If some variables have a replication
less than 0.70 in their assigned dimension, then they are considered unstable
and therefore not invariant. These variables are removed and this process
is repeated until all items are considered stable (replication values greater
than 0.70) or there are no variables left. If configural invariance cannot be
established, then the last run of results are returned and metric invariance
is not tested (because configural invariance is not met). Importantly, if any
variables are removed, then configural invariance is not met for the
original structure. Any removal would suggest only partial configural invariance
is met.
Metric Invariance
The variables that remain after configural invariance are submitted to metric
invariance. First, each group estimates a network and then network loadings
(net.loads
) are computed using the assigned
community memberships (determined during configural invariance). Then,
the difference between the assigned loadings of the groups is computed. This
difference represents the empirical values. Second, the group memberships
are permutated and networks are estimated based on the these permutated
groups for iter
times. Then, network loadings are computed and
the difference between the assigned loadings of the group is computed, resulting
in a null distribution. The empirical difference is then compared against
the null distribution using a two-tailed p-value based on the number
of null distribution differences that are greater and less than the empirical
differences for each variable. Both uncorrected and false discovery rate
corrected p-values are returned in the results. Uncorrected p-values
are flagged for significance along with the direction of group differences.
Three or More Groups
When there are 3 or more groups, the function performs metric invariance testing by comparing all possible pairs of groups. Specifically:
Pairwise Comparisons: The function generates all possible unique group pairings and computes the differences in network loadings for each pair. The same community structure, derived from configural invariance or provided by the user, is used for all groups.
Permutation Testing: For each group pair, permutation tests are conducted to assess the statistical significance of the observed differences in loadings. p-values are calculated based on the proportion of permuted differences that are greater than or equal to the observed difference.
Result Compilation: The function compiles the results for each pair including
both uncorrected (p
) and FDR-corrected (Benjamini-Hochberg; p_BH
) p-values,
and the direction of differences. It returns a summary of the findings for all pairwise comparisons.
This approach allows for a detailed examination of metric invariance across multiple groups, ensuring that all potential differences are thoroughly assessed while maintaining the ability to identify specific group differences.
For more details, see Jamison, Golino, and Christensen (2023)
Returns a list containing:
configural.results |
|
memberships |
Original memberships provided in |
EGA |
Original |
groups |
A list containing:
|
permutation |
A list containing:
|
results |
Data frame of the results (which are printed) |
Laura Jamison <lj5yn@virginia.edu>, Hudson F. Golino <hfg9s at virginia.edu>, and Alexander P. Christensen <alexpaulchristensen@gmail.com>,
Original implementation
Jamison, L., Christensen, A. P., & Golino, H. F. (2024).
Metric invariance in exploratory graph analysis via permutation testing.
Methodology, 20(2), 144-186.
plot.EGAnet
for plot usage in
# Load data
wmt <- wmt2[-1,7:24]
# Groups
groups <- rep(1:2, each = nrow(wmt) / 2)
## Not run:
# Measurement invariance
results <- invariance(wmt, groups, ncores = 2)
# Plot with uncorrected alpha = 0.05
plot(results, p_type = "p", p_value = 0.05)
# Plot with BH-corrected alpha = 0.10
plot(results, p_type = "p_BH", p_value = 0.10)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.