VH = 5000
den = 0.0016
EH = den * (VH * (VH - 1)/2)
n = VH
m = EH
mygra = sample_gnm(n, m, directed = FALSE, loops = FALSE)
graph.density(mygra)[1] 0.0016
IGRAPH 6821005 U--- 5000 19996 -- Erdos renyi (gnm) graph
+ attr: name (g/c), type (g/c), loops (g/l), m (g/n)
[1] 0.0004 0.0026 0.0120 0.0288 0.0568 0.0926 0.1206 0.1344 0.1428 0.1272
[11] 0.1000 0.0668 0.0510 0.0288 0.0178 0.0092 0.0052 0.0024 0.0004 0.0000
[21] 0.0002
[1] 0.04761905
net_100 <- generate_BA(N = 100, m = 1)
net_stats_100 <- get_statistics(net_100)
summary(net_stats_100)Contains summary statistics for the temporal network.
Type of network: directed
Number of nodes in the final network: 99
Number of edges in the final network: 98
Number of new nodes: 98
Number of new edges: 97
Number of time-steps: 98
Maximum in-degree: 24
Number of bins: 25
net_5000 <- generate_BA(N = 5000, m = 1)
net_stats_5000 <- get_statistics(net_5000)
summary(net_stats_5000)Contains summary statistics for the temporal network.
Type of network: directed
Number of nodes in the final network: 4999
Number of edges in the final network: 4998
Number of new nodes: 4998
Number of new edges: 4997
Number of time-steps: 4998
Maximum in-degree: 212
Number of bins: 50
d.net_ig <- degree(net_ig)
rr = hist(d.net_ig, col = "blue", xlab = "Degree", ylab = "Frequency", main = "Degree Distribution")plot(rr$breaks[-1], rr$counts, log = "yx", type = "h", lwd = 20, col = rgb(0.8, 0.1,
0.1, 0.6), main = "Histogram of Degree Distribution in log-log scale", xlab = " Degree Distribution (log Scale)",
ylab = "frequency (log scale)", cex.lab = 1.5, cex.axis = 1.5, cex.main = 1.5,
cex.sub = 1.5)dd.net_ig <- degree.distribution(net_ig)
d <- 1:max(d.net_ig) - 1
ind <- (dd.net_ig != 0)
plot(d[ind], dd.net_ig[ind], log = "xy", col = rgb(0.8, 0.1, 0.1, 0.6), xlab = c("Log-Degree"),
ylab = c("Log-Intensity"), main = "Log-Log Degree Distribution", lwd = 5, cex.lab = 1.5,
cex.axis = 1.5, cex.main = 1.5, cex.sub = 1.5)[1] 1.9996
dd005 = case_05[, 3]
mm_005 = conpl$new(dd005)
est_005 = estimate_pars(mm_005)
est_005 = estimate_pars(mm_005)
mm_005$setXmin(5)
mm_005$setPars(2)
est_005$pars
[1] 1.483884
$value
[1] 836.4084
$counts
function gradient
13 13
$convergence
[1] 0
$message
[1] "CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH"
attr(,"class")
[1] "estimate_pars"
Contains summary statistics for the temporal network.
Type of network: directed
Number of nodes in the final network: 199
Number of edges in the final network: 198
Number of new nodes: 198
Number of new edges: 197
Number of time-steps: 198
Maximum in-degree: 175
Number of bins: 50
net_ig_case_05 = PAFit::to_igraph(net_case_05)
d.net_ig <- degree(net_ig_case_05)
rr = hist(d.net_ig, col = "blue", xlab = "Degree", ylab = "Frequency", main = "Degree Distribution")plot(rr$breaks[-1], rr$counts, log = "yx", type = "h", lwd = 30, col = rgb(0.8, 0.1,
0.1, 0.6), main = "Histogram of Degree Distribution in log-log scale", xlab = " Degree Distribution (log Scale)",
ylab = "frequency (log scale)")dd.net_ig <- degree.distribution(net_ig_case_05)
d <- 1:max(d.net_ig) - 1
ind <- (dd.net_ig != 0)
plot(d[ind], dd.net_ig[ind], log = "xy", col = rgb(0.8, 0.1, 0.1, 0.6), xlab = c("Log-Degree"),
ylab = c("Log-Intensity"), main = "Log-Log Degree Distribution", lwd = 5)dd006 = case_06[, 3]
mm_006 = conpl$new(dd006)
est_006 = estimate_pars(mm_006)
est_006 = estimate_pars(mm_006)
mm_006$setXmin(5)
mm_006$setPars(2)
est_006$pars
[1] 1.098897
$value
[1] -2374.241
$counts
function gradient
14 14
$convergence
[1] 0
$message
[1] "CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH"
attr(,"class")
[1] "estimate_pars"
net_case_06 <- generate_BA(N = 1000, m = 1, alpha = est_006$pars)
net_stats_case_06 <- get_statistics(net_case_06)
summary(net_stats_case_06)Contains summary statistics for the temporal network.
Type of network: directed
Number of nodes in the final network: 999
Number of edges in the final network: 998
Number of new nodes: 998
Number of new edges: 997
Number of time-steps: 998
Maximum in-degree: 214
Number of bins: 50
net_ig_case_06 = PAFit::to_igraph(net_case_06)
d.net_ig <- degree(net_ig_case_06)
rr = hist(d.net_ig, col = "blue", xlab = "Degree", ylab = "Frequency", main = "Degree Distribution")plot(rr$breaks[-1], rr$counts, log = "yx", type = "h", lwd = 30, col = rgb(0.8, 0.1,
0.1, 0.6), main = "Histogram of Degree Distribution in log-log scale", xlab = " Degree Distribution (log Scale)",
ylab = "frequency (log scale)")dd.net_ig <- degree.distribution(net_ig_case_06)
d <- 1:max(d.net_ig) - 1
ind <- (dd.net_ig != 0)
plot(d[ind], dd.net_ig[ind], log = "xy", col = rgb(0.8, 0.1, 0.1, 0.6), xlab = c("Log-Degree"),
ylab = c("Log-Intensity"), main = "Log-Log Degree Distribution", lwd = 5)dd007 = case_07[, 3]
mm_007 = conpl$new(dd007)
est_007 = estimate_pars(mm_007)
est_007 = estimate_pars(mm_007)
mm_007$setXmin(5)
mm_007$setPars(2)
est_007$pars
[1] 1.013785
$value
[1] -254190.1
$counts
function gradient
19 19
$convergence
[1] 0
$message
[1] "CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH"
attr(,"class")
[1] "estimate_pars"
net_case_07 <- generate_BA(N = 5000, m = 1, alpha = est_007$pars)
net_stats_case_07 <- get_statistics(net_case_07)
summary(net_stats_case_07)Contains summary statistics for the temporal network.
Type of network: directed
Number of nodes in the final network: 4999
Number of edges in the final network: 4998
Number of new nodes: 4998
Number of new edges: 4997
Number of time-steps: 4998
Maximum in-degree: 219
Number of bins: 50
net_ig_case_07 = PAFit::to_igraph(net_case_07)
d.net_ig <- degree(net_ig_case_07)
rr = hist(d.net_ig, col = "blue", xlab = "Degree", ylab = "Frequency", main = "Degree Distribution")plot(rr$breaks[-1], rr$counts, log = "yx", type = "h", lwd = 30, col = rgb(0.8, 0.1,
0.1, 0.6), main = "Histogram of Degree Distribution in log-log scale", xlab = " Degree Distribution (log Scale)",
ylab = "frequency (log scale)")dd.net_ig <- degree.distribution(net_ig_case_07)
d <- 1:max(d.net_ig) - 1
ind <- (dd.net_ig != 0)
plot(d[ind], dd.net_ig[ind], log = "xy", col = rgb(0.8, 0.1, 0.1, 0.6), xlab = c("Log-Degree"),
ylab = c("Log-Intensity"), main = "Log-Log Degree Distribution", lwd = 5)