bootInclude: Inclusion proportion graph

View source: R/bootInclude.R

bootIncludeR Documentation

Inclusion proportion graph

Description

This function takes bootstrap results and returns a inclusion probability network (edge weights indicate how often a certain edge was included in the model). Note that the plotting method automatically uses a black-white color scheme (as edges are not signed and always positive).

Usage

bootInclude(bootobject, verbose = TRUE)

Arguments

bootobject

Nonparametric bootstrap results from bootnet

verbose

Logical, should progress be reported to the console?

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)
# Subset of data:
bfiSub <- bfi[1:250,1:25]

# Estimate ggmModSelect networks (not stepwise to increase speed):
Network <- estimateNetwork(bfiSub], default = "ggmModSelect", corMethod = "cor",
              stepwise = FALSE)

# Bootstrap 100 values, using 8 cores (100 to incease speed, preferably 1000+):
boots <- bootnet(Network, nBoots = 100, nCores = 8)

# Threshold network:
Network_inclusion <- bootInclude(boots)

# Plot:
plot(Network_inclusion)

## End(Not run)

SachaEpskamp/bootnet documentation built on Feb. 21, 2024, 8:21 a.m.