This function wraps the function NCT
from the NetworkComparisonTest package
to provide an explicit test for the significance of node impacts.
impact.NCT(
input,
it,
gamma,
nodes = c("all"),
binary.data = FALSE,
weighted = TRUE,
split = c("median", "mean", "forceEqual", "cutEqual", "quartiles"),
paired = FALSE,
AND = TRUE,
test.edges = FALSE,
edges,
progressbar = TRUE
)
a matrix or data frame of observations (not a network/edgelist).
See included example datasets depression
and social
.
the number of iterations (permutations) in each network comparison test
the sparsity parameter used in generating networks. Defaults to 0.5 for interval data and 0.25 for binary data
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)).
logical. Indicates whether the input data is binary
logical. Indicates whether resultant networks preserve edge weights or binarize edges.
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 (paired, AND, test.edges, edges, progressbar)
Logical. Can be TRUE of FALSE to indicate whether the samples are dependent or not. If paired is TRUE, relabeling is performed within each pair of observations. If paired is FALSE, relabeling is not restricted to pairs of observations. Note that, currently, dependent data is assumed to entail one group measured twice.
Logical. Can be TRUE of FALSE to indicate whether the AND-rule or the OR-rule should be used to define the edges in the network. Defaults to TRUE. Only necessary for binary data.
Logical. Can be TRUE of FALSE to indicate whether or not differences in individual edges should be tested.
Character or list. When 'all', differences between all individual edges are tested. When provided a list with one or more pairs of indices referring to variables, the provided edges are tested. A Holm-Bonferroni correction is applied to control for multiple testing.
Logical. Should the pbar be plotted in order to see the progress of the estimation procedure? Defaults to TRUE.
impact
returns a list where each element is an object of class NCT
The NCT 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.
In order to be interpreted in a meaningful way, the significance of impact statistics should be explicitly tested.
The NCT function from the NetworkComparisonTest uses a permutation test to determine the significance
of structure invariances between two networks. Because impact statistics are mathematically defined as structural invariance between
two networks, NCT
is an appropriate method to test the significance of impact statistics.
impact.NCT
returns an object of class NCT
, which includes p-values for invariances.