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, ...)
Value
A list of result
stat
NAC or NAC+ test statistic.
z
row label vector.
y
column label vector.
Arguments
A
adjacency matrix.
K
number of communities.
z
label vector for rows of A. If not provided, will be estimated from cluster_fct.
y
label vector for columns of A. If not provided, will be estimated from cluster_fct.
plus
whether or not use column label vector with (K+1) communities, default is TRUE.
cluster_fct
community detection function to get z and y, by default using spec_clust.
The first two arguments have to be A and K.