Learn R Programming

networktools (version 1.1.0)

global.impact: Global Strength Impact

Description

Generates the global strength impact of each specified node. Global strength impact can be interpreted as the degree to which the level of a node impacts the overall connectivity of the network

Usage

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

Arguments

input

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

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

Value

global.impact() returns a list of class "global.impact" which contains:

impact

a named vector containing the global strength impact for each node tested

lo

a named vector containing the global strength estimate for the lower half

hi

a named vector containing the global strength estimate for the upper half

Details

For an explanation of impact functions in general, see impact.

Global strength is defined as the sum of the absolute value of all edges in the network, and is closely related to the concept of density (density is the sum of edges not accounting for absolute values). Global strength impact measures to what degree the global strength varies as a function of each node.

Examples

Run this code
# NOT RUN {
out <- global.impact(depression[,1:3])
# }
# NOT RUN {
out1 <- global.impact(depression)
out2 <- global.impact(depression, gamma=0.65,
    nodes=c("sleep_disturbance", "psychomotor_retardation"))
out3 <- global.impact(social, binary.data=TRUE)
out4 <- global.impact(social, nodes=c(1:6, 9), binary.data=TRUE)

summary(out1)
plot(out1)
# }

Run the code above in your browser using DataLab