Learn R Programming

dils (version 0.8.1)

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

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

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.

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, ...)

Details

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

References

https://github.com/shaptonstahl/dils

Examples

Run this code
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)

Run the code above in your browser using DataLab