RelativeNetworkInformation: Compare how much two networks inform a particular network...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/RelativeNetworkInformation.R

Description

Given two igraph networks, use MeasureNetworkInformation to gauge the informativeness of each network and then return the ratio. If greater than 1, then the first network specified is more informative.

Usage

1
2
3
  RelativeNetworkInformation(g1, g2, FUN = betweenness,
    remove.share = 0.2, sample.size = 100,
    progress.bar = FALSE)

Arguments

g1

igraph, graph to measure

g2

igraph, graph to measure

FUN

function, a function that takes an igraph and returns a value for each node in the network.

remove.share

numeric, fraction of the edges that are removed randomly when perturbing the network.

sample.size

numeric, number of perturbed graphs to generate

progress.bar

logical, if TRUE then a progress bar is shown.

Details

This measure appears to be very sensitive to the choice of FUN. See MeasureNetworkInformation for details.

Value

list, containing the following

g1.over.g2 numeric informativeness of the first network over the second
winner character either g1 or g2
g1.measure numeric MeasureNetworkInformation(g1, ...)
g2.measure numeric MeasureNetworkInformation(g2, ...)

Author(s)

Stephen R. Haptonstahl srh@haptonstahl.org

References

https://github.com/shaptonstahl/dils

Examples

1
2
3
4
5
6
g.rand <- random.graph.game(100, 5/100)

pf <- matrix( c(.8, .2, .3, .7), nr=2)
g.pref <- preference.game(100, 2, pref.matrix=pf)

RelativeNetworkInformation(g.rand, g.pref)

dils documentation built on May 2, 2019, 8:28 a.m.