# NOT RUN {
# BFI Extraversion data from psychTools package:
library("psychTools")
data(bfi)
bfiSub <- bfi[,1:25]
# Estimate network:
Network <- estimateNetwork(bfiSub, default = "EBICglasso")
# Bootstrap 1000 values, using 8 cores:
Results1 <- bootnet(Network, nBoots = 1000, nCores = 8)
# Test for difference in strength between node "A1" and "C2":
differenceTest(Results, "A1", "C2", "strength")
# Test for difference between edge N1--N2 and N3--N4:
differenceTest(Results, "N1--N2", "N3--N4", "edge")
# Alternative:
differenceTest(Results, x = "N1", x2 = "N2", y = "N3",
y2 = "N4", measure = "edge")
# }
Run the code above in your browser using DataLab