do.power.law {netmodels}R Documentation

Compares the degree distribution with the power law distribution

Description

Performs the goodness of fit (KS) test for network's degree distribution versus the theoretical power law distribution. The test results are printed along with the graphical representation of both distributions.

Usage

do.power.law(obj, filename = NULL, main = "Comparative cumulative fraction plot of the degree distribution", report = FALSE)

Arguments

obj Could be a igraph network object or the degree distribution of the network
filename If it is specified, two files are created: 1) csv file with the test results and 2) pdf file with the graphic chart
main Title to be printed on the graphic chart, default="Comparative cumulative fraction plot of the degree distribution"
report If it is TRUE, the KS results are displayed on the graphic chart

Value

Dataframe containing the names(var) and the results is returned.

Note

This tests is designed to check if the degree distribution of the network compares with equivalent theorical power law distribution. If you find the degree distribution follows the power law distribution, futher testing is required to determine if the networks is scale free. Please refer to the following paper for the complete testing procedure:

Newman, M.E.J.(2003):The structure and function of complex networks.Proceedings of the National Academy of Science the United States of America.

The next version of this rutine will perform the complete testing procedure, including the generation of synthetic power law data.

Examples


data(test.net,package="netmodels")
v <- do.power.law(test.net)


[Package netmodels version 0.2 Index]