Learn R Programming

networktools (version 1.1.0)

impact.boot: Bootstrapping convenience function for impact statistics

Description

impact.boot is BETA software. Please report any bugs. Plotting/printing/summary will be added soon.

Usage

impact.boot(input, boots, gamma, nodes = c("all"), binary.data = FALSE,
  weighted = TRUE, split = c("median", "mean", "forceEqual", "cutEqual",
  "quartiles"), progressbar = TRUE)

Arguments

input

a matrix or data frame of observations (not a network/edgelist). See included example datasets depression and social.

boots

the number of times to bootstrap the impact function

gamma

the sparsity parameter used in generating networks. Defaults to 0.5 for interval data and 0.25 for binary data

nodes

indicates which nodes should be tested. Can be given as a character string of desired nodes (e.g., c("node1","node2")) or as a numeric vector of column numbers (e.g., c(1,2)).

binary.data

logical. Indicates whether the input data is binary

weighted

logical. Indicates whether resultant networks preserve edge weights or binarize edges.

split

method by which to split network given non-binary data. "median": median split (excluding the median), "mean": mean split, "forceEqual": creates equally sized groups by partitioning random median observations to the smaller group, "cutEqual": creates equally sized groups by deleting random values from the bigger group,"quartile": uses the top and bottom quartile as groups

progressbar

Logical. Should the pbar be plotted in order to see the progress of the estimation procedure? Defaults to TRUE.

Value

impact.boot returns a list of class "impact.boot"

Details

This function wraps the function impact and bootstraps to provide confidence intervals of node impacts.

This method is computationally intensive. It is recommended that users test a subset of nodes at a time using the nodes argument, rather than testing all nodes simultaneously.

impact.boot returns an object of class impact.boot, which includes confidence intervals.

Examples

Run this code
# NOT RUN {
boot1 <- impact.boot(depression, boots=25, nodes="psychomotor_retardation")

boot2 <- impact.boot(social, boots=25, nodes="Kim", binary.data=TRUE, split="cutEqual")

##Note: for speed, 25 boots are used here; more are necessary in practice
# }

Run the code above in your browser using DataLab