structure.stat: The Structure Scan Statistic

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

The structure scan statistic evaluate the statistic which compare the log likelihood within the subgraph with that outside the subgraph when the distribution of the graph follows Poisson random graph.

Usage

1
structure.stat(g, subnodes)

Arguments

g

The original graph.

subnodes

Numeric vector, the vertices of the original graph which will separate the original graph into two partitions.

Details

Suppose subnodes are selected and form a subgraph Z. The likelihood ratio statistic of a selected subgraph Z is

λ_S(Z)=\ln LR(Z) = \ln \frac{L_Z}{L_0}= |E_Z|\ln\big({\frac{|E_Z|}{μ(Z)}}\big) + (|E_G|-|E_Z|) \ln\big({\frac{|E_G|-|E_Z|}{μ(G)-μ(Z)}}\big) \mbox{ when }\hat{α}>\hat{β},

where \hat{α}=\frac{|E_Z|}{μ(Z)} and \hat{β}=\frac{|E_G|-|E_Z|}{μ(G)-μ(Z)}, in which

μ(G)=\frac{k_G^2}{4|E_G|}, μ(Z)=\frac{k_Z^2}{4|E_G|}, \mbox{ and } μ(Z^C)=μ(G)-μ(Z)

with k_G=∑_{i \in G} k_i the total sum of degrees. When \hat{α} ≤q \hat{β}, λ_S(Z)=0.

Value

Three values will be returned. The first value is the test statistic. The rest of are estimated ratios which equal to observed edges divided by expected edges while the former was estimated outside and the later was estimated within the selected subgraph.

Author(s)

Taichi Wang <taichi43@stat.sinica.edu.tw>

References

Wang, B., Phillips, J. M., Schreiber, R., Wilkinson, D. M., Mishra, N., & Tarjan, R. (2008). Spatial Scan Statistics for Graph Clustering. In SDM (pp. 727–738).
Wang, T. C., & Phoa, F. K. H. (2016). A scanning method for detecting clustering pattern of both attribute and structure in social networks. Physica A: Statistical Mechanics and its Applications, 445, 295-309.

See Also

igraph

Examples

1
2
3
library(igraph)
g <- graph.ring(10)
structure.stat(g=g, subnodes=c(1:3))

taichi43/SNscan documentation built on May 31, 2019, 2:48 a.m.