bootThreshold: Threshold network based on bootstrapped intervals

View source: R/bootThreshold.R

bootThresholdR Documentation

Threshold network based on bootstrapped intervals

Description

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.

Usage

bootThreshold(bootobject, alpha = 0.05, verbose = TRUE, thresholdIntercepts = FALSE)

Arguments

bootobject

Nonparametric bootstrap results from bootnet

alpha

Significance level

verbose

Logical, should progress be reported to the console?

thresholdIntercepts

Logical, should intercepts also be thresholded?

Value

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

Author(s)

Sacha Epskamp <mail@sachaepskamp.com>

See Also

bootnet, estimateNetwork

Examples

## 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)

bootnet documentation built on May 29, 2024, 8:38 a.m.