differenceTest {bootnet} | R Documentation |
This function computes the bootstrapped difference test for edge-weights and centrality indices. A confidence interval is constructured on the difference of two values, and the test is deemed significant if zero is not in this confidence interval. See also Epskamp, Borsboom and Fried (2016) for more details.
differenceTest(bootobject, x, y, measure = c("strength", "closeness", "betweenness"), alpha = 0.05, x2, y2, verbose = TRUE)
bootobject |
Output of |
x |
A character string indicating the ID of a node or an edge, or a number indiacting the node or edge. For an edge, can be e.g., |
y |
A character string indicating the ID of a node or an edge, or a number indiacting the node or edge. For an edge, can be e.g., |
measure |
Measure to test. Can be |
alpha |
Signifiance level to test at. Note that the actual signifiance level is influenced by the number of bootstrap samples, and is returned in a message. |
x2 |
Second node in an edge. optional. |
y2 |
Second node in an edge. optional. |
verbose |
Logical, should the message indiacting actual signifiance level be printed? |
Sacha Epskamp <mail@sachaepskamp.com>
Epskamp, S., Borsboom, D., & Fried, E. I. (2016). Estimating psychological networks and their accuracy: a tutorial paper. arXiv preprint, arXiv:1604.08462.
## 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") ## End(Not run)