Learn R Programming

SNscan (version 1.0)

powerlaw.stat: Discrete Power-Law Scan Statistic

Description

The discrete power-law scan statistic evaluates the statistic which compares the node attribute within the subgraph with that outside the subgraph while the node attribute follows the power-law distribution.

Usage

powerlaw.stat(obs, pop = 1, zloc, xmin = 1, zetatable = NULL)

Arguments

obs
Numeric vector of observation values.
pop
Numeric vector of population values; default = 1.
zloc
Numeric vector of selected nodes.
xmin
The minmum value of power law distribution; defaut = 1.
zetatable
When xmin=1, set up the data(zetatable).

Value

Three values will be returned. The first value is test statistic. The second is the estimated means which estimated outside the selected nodes. The third is estimated means which estimated within the selected nodes.

References

Wang, T. C., Phoa, F. K. H., & Hsu, T. C. (2015). Power-law distributions of attributes in community detection. Social Network Analysis and Mining, 5(1), 1-10.

See Also

rplcon,zetatable,conpowerlaw.stat

Examples

Run this code
library(poweRlaw)
data(zetatable)
x=rpldis(n=100, xmin=1, alpha=1.5) #function from poweRlaw
powerlaw.stat(obs=x,zloc=1:5,zetatable = zetatable)

Run the code above in your browser using DataLab