View source: R/network.compare.R
network.compare | R Documentation |
A permutation implementation to determine statistical significance of whether the network structures are different from one another
network.compare(
base,
comparison,
corr = c("auto", "cor_auto", "pearson", "spearman"),
na.data = c("pairwise", "listwise"),
model = c("BGGM", "glasso", "TMFG"),
iter = 1000,
ncores,
verbose = TRUE,
seed = NULL,
...
)
base |
Matrix or data frame. Should consist only of variables to be used in the analysis. First dataset |
comparison |
Matrix or data frame. Should consist only of variables to be used in the analysis. Second dataset |
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
|
iter |
Numeric (length = 1).
Number of permutations to perform.
Defaults to |
ncores |
Numeric (length = 1).
Number of cores to use in computing results.
Defaults to |
verbose |
Boolean (length = 1).
Should progress be displayed?
Defaults to |
seed |
Numeric (length = 1).
Defaults to |
... |
Additional arguments that can be passed on to
|
Returns a list:
network |
Data frame with row names of each measure, empirical value ( |
edges |
List containing matrices of values for empirical values ( |
Hudson Golino <hfg9s at virginia.edu> and Alexander P. Christensen <alexpaulchristensen@gmail.com>
Frobenius Norm
Ulitzsch, E., Khanna, S., Rhemtulla, M., & Domingue, B. W. (2023).
A graph theory based similarity metric enables comparison of subpopulation psychometric networks.
Psychological Methods.
Jensen-Shannon Similarity (1 - Distance)
De Domenico, M., Nicosia, V., Arenas, A., & Latora, V. (2015).
Structural reducibility of multilayer networks.
Nature Communications, 6(1), 1–9.
Total Network Strength
van Borkulo, C. D., van Bork, R., Boschloo, L., Kossakowski, J. J., Tio, P., Schoevers, R. A., Borsboom, D., & Waldorp, L. J. (2023).
Comparing network structures on three aspects: A permutation test.
Psychological Methods, 28(6), 1273–1285.
# Load data
wmt <- wmt2[,7:24]
# Set groups (if necessary)
groups <- rep(1:2, each = nrow(wmt) / 2)
# Groups
group1 <- wmt[groups == 1,]
group2 <- wmt[groups == 2,]
## Not run: # Perform comparison
results <- network.compare(group1, group2)
# Print results
print(results)
# Plot edge differences
plot(results)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.