# Import netcom
library(netcom)
# Adjacency matrix
size <- 10
network <- matrix(sample(c(0,1), size = size^2, replace = TRUE), nrow = size, ncol = size)
# Calculate how similar the input network is to Small-World networks with
# a rewiring probability of 0.28.
null_fit_optim(
parameter = 0.28,
process = "SW",
network = network,
net_size = 12,
iters = 20,
neighborhood = max(1, round(0.1 * net_size)),
net_kind = "matrix",
mechanism_kind = "grow",
power_max = 5,
connectance_max = 0.5,
divergence_max = 0.5,
cores = 1,
directed = TRUE,
method = "DD",
size_different = FALSE,
cause_orientation = "row",
DD_kind = c(
"in", "out", "entropy_in", "entropy_out",
"clustering_coefficient", "page_rank", "communities"
),
DD_weight = 1,
best_fit_sd = 0,
max_norm = FALSE,
null_dist_trim = 0,
ks_dither = 0,
ks_alternative = "two.sided",
verbose = FALSE
)
Run the code above in your browser using DataLab