Learn R Programming

migraph (version 0.8.13)

tests: Conditional uniform graph and permutation tests

Description

These functions conduct conditional uniform graph (CUG) or permutation (QAP) tests of any graph-level statistic.

Usage

test_random(object, FUN, ..., nSim = 1000)

test_permutation(object, FUN, ..., nSim = 1000)

Arguments

object

A data frame edgelist, matrix, igraph, tidygraph, or network object.

FUN

A graph-level statistic function to test.

...

Additional arguments to be passed on to FUN, e.g. the name of the attribute.

nSim

The number of Monte Carlo simulations to perform.

Examples

Run this code
# NOT RUN {
marvel_friends <- to_unsigned(ison_marvel_relationships)
marvel_friends <- to_main_component(marvel_friends) %>% 
  filter(PowerOrigin == "Human")
(cugtest <- test_random(marvel_friends, graph_ei_index, attribute = "Attractive",
  nSim = 200))
plot(cugtest)
(qaptest <- test_permutation(marvel_friends, graph_ei_index, attribute = "Attractive",
  nSim = 200))
plot(qaptest)
# }

Run the code above in your browser using DataLab