ResIN_boots_execute: Carry out prepared bootstrap analyses on ResIN networks

View source: R/ResIN_boots_execute.R

ResIN_boots_executeR Documentation

Carry out prepared bootstrap analyses on ResIN networks

Description

Executes a bootstrap plan created by ResIN_boots_prepare by repeatedly re-estimating ResIN on resampled or permuted versions of the original data. Can optionally leverage CPU parallelism.

Usage

ResIN_boots_execute(
  ResIN_boots_prepped,
  parallel = FALSE,
  detect_cores = TRUE,
  core_offset = 0L,
  n_cores = 2L,
  inorder = FALSE
)

Arguments

ResIN_boots_prepped

A "ResIN_boots_prepped" bootstrap plan (output of ResIN_boots_prepare).

parallel

Should execution use parallelism via foreach + a PSOCK cluster? Defaults to FALSE.

detect_cores

Should available CPU cores be detected automatically? Defaults to TRUE (ignored when parallel = FALSE).

core_offset

Integer offset subtracted from the number of detected cores. Defaults to 0L.

n_cores

Manually specify number of cores (ignored if detect_cores = TRUE or parallel = FALSE).

inorder

Should parallel execution preserve sequential ordering? Defaults to FALSE.

Value

An object of class "ResIN_boots_executed" containing n bootstrapped ResIN fits. Use print(), summary(), length(), and [ to inspect or subset results. See ResIN_boots_executed for details.

Examples

## Load the 12-item simulated Likert-type toy dataset
data(lik_data)

# Apply the ResIN function to toy Likert data:
ResIN_obj <- ResIN(lik_data, network_stats = TRUE,
                      generate_ggplot = FALSE, plot_ggplot = FALSE)


# Prepare for bootstrapping
prepped_boots <- ResIN_boots_prepare(ResIN_obj, n=100, boots_type="resample")

# Execute the prepared bootstrap list
executed_boots <-  ResIN_boots_execute(prepped_boots, parallel = TRUE, detect_cores = TRUE)

# Extract results - here for example, the network (global)-clustering coefficient
ResIN_boots_extract(executed_boots, what = "global_clustering", summarize_results = TRUE)



ResIN documentation built on March 2, 2026, 9:07 a.m.