adj_spec_test | R Documentation |
The adjusted spectral goodness-of-fit test based on Poisson DCSBM.
The test is a natural extension on Lei's work of testing goodness-of-fit
for SBM. The residual matrix \tilde{A} is computed from the DCSBM estimation
expectation of A
. To speed up computation, the residual matrix uses Poisson variance instead.
Specifically,
\tilde{A}_{ij} = (A_{ij} - \hat P_{ij}) / ( n \hat P_{ij})^{1/2}, \quad \hat P_{ij} = \hat θ_i \hat θ_j \hat B_{\hat{z}_i, \hat{z}_j} \cdot 1\{i \neq j\}
where \hat{θ} and \hat{B} are computed using estim_dcsbm if not provided.
Adjusted spectral test
adj_spec_test( A, K, z = NULL, DC = TRUE, theta = NULL, B = NULL, cluster_fct = spec_clust, ... )
A |
adjacency matrix. |
K |
number of communities. |
z |
label vector for rows of adjacency matrix. If not given, will be calculated by the spectral clustering. |
DC |
whether or not include degree correction in the parameter estimation. |
theta |
give the propensity parameter directly. |
B |
give the connectivity matrix directly. |
cluster_fct |
community detection function to get |
... |
additional arguments for |
Adjusted spectral test statistics.
Details of modification can be seen at Adjusted chi-square test for degree-corrected block models, Linfan Zhang, Arash A. Amini, arXiv preprint arXiv:2012.15047, 2020.
The original spectral test is from A goodness-of-fit test for stochastic block models Lei, Jing, Ann. Statist. 44 (2016), no. 1, 401–424. doi:10.1214/15-AOS1370.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.