| nac_test {nett} | R Documentation | 
NAC test
Description
The NAC test to measure the goodness-of-fit of the DCSBM to network data.
The function computes the NAC+ or NAC statistics in the paper below. Label vectors, if
not provided, are estimated using spec_clust by default but one can also use any other
community detection algorithms through cluster_fct. Note that the function has to have
A and K as its first two arguments, and additional arguments could be provided through
....
Usage
nac_test(A, K, z = NULL, y = NULL, plus = TRUE, cluster_fct = spec_clust, ...)
Arguments
| A | adjacency matrix. | 
| K | number of communities. | 
| z | label vector for rows of  | 
| y | label vector for columns of  | 
| plus | whether or not use column label vector with ( | 
| cluster_fct | community detection function to get  | 
| ... | additional arguments for  | 
Value
A list of result
| stat | NAC or NAC+ test statistic. | 
| z | row label vector. | 
| y | column label vector. | 
References
Adjusted chi-square test for degree-corrected block models, Linfan Zhang, Arash A. Amini, arXiv preprint arXiv:2012.15047, 2020.
See Also
Examples
A <- sample_dcpp(500, 10, 4, 0.1)$adj
nac_test(A, K = 4)$stat
nac_test(A, K = 4, cluster_fct = fast_cpl)$stat