View source: R/bootThreshold.R
bootThreshold | R Documentation |
This function takes the output of bootnet
and returns a network as if it had been estimated using estimateNetwork
, but with edges removed (set to zero) based on some significance level.
bootThreshold(bootobject, alpha = 0.05, verbose = TRUE, thresholdIntercepts = FALSE)
bootobject |
Nonparametric bootstrap results from |
alpha |
Significance level |
verbose |
Logical, should progress be reported to the console? |
thresholdIntercepts |
Logical, should intercepts also be thresholded? |
A bootnetResult
object with the following elements:
graph |
The weights matrix of the network |
intercepts |
The intercepts |
results |
The results of the estimation procedure |
labels |
A vector with node labels |
nNodes |
Number of nodes in the network |
nPerson |
Number of persons in the network |
input |
Input used, including the result of the default set used |
Sacha Epskamp <mail@sachaepskamp.com>
bootnet
, estimateNetwork
## Not run:
# BFI Extraversion data from psychTools package:
library("psychTools")
data(bfi)
bfiSub <- bfi[,1:25]
# Estimate unregularized network:
Network <- estimateNetwork(bfiSub, default = "pcor", corMethod = "cor")
# Bootstrap 1000 values, using 8 cores:
boots <- bootnet(Network, nBoots = 1000, nCores = 8)
# Threshold network:
Network_thresholded <- bootThreshold(boots)
# Plot:
plot(Network_thresholded)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.