Thank you for creating such an amazing tool.
I am currently working with your tools and have a question about the random graphs generated using analysis_random_graphs and sim.rand.graph.par.
As I was following the user guide, I calculated the characteristic path length (Lp) for 100 random graphs generated for a single subject. Then I noticed that the Lp values were identical across all 100 graphs. This behavior was unexpected, as I assumed that Lp values would vary due to the randomness of the graphs. Could you clarify if this is an intended behavior or if I might have missed something in the setup?
For reference, I used the following commands to generate and analyze the random graphs:
kNumRandClust <- 1e2
bgl.rand <- g.rand <- small.clust.dt <- vector('list', length(g))
for (i in seq_along(g)) {
g.rand[[i]] <- vector('list', length=nobs(g[[i]]))
for (j in seq_len(nobs(g[[i]]))) {
g.rand[[i]][[j]] <- sim.rand.graph.par(g[[i]][j],level=g[[i]]$level,kNumRandClust, clustering=T, name=g[[i]][j]$name)
}
bgl.rand[[i]] <- as_brainGraphList(g.rand[[i]], type='random', level=g[[i]]$level)
small.clust.dt[[i]] <- small.world(g[[i]], bgl.rand[[i]])
}
The output of the Lp values for a single subject (e.g., sub001) is as follows:
Lp_values <- lapply(bgl.rand[[1]]$graphs, function(graph_list) {
+ sapply(graph_list, function(g) graph_attr(g, "Lp"))
+ })
print(Lp_values)
$sub001
[1] 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264
[10] 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264
[19] 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264
[28] 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264
[37] 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264
[46] 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264
[55] 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264
[64] 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264
[73] 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264
[82] 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264
[91] 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264 1.173264
[100] 1.173264
This was also the case for other subjects.
It would be helpful to know if this is the expected behavior of the random graph generation process or if there might be an issue with the configuration or implementation on my end.
This is my sessionInfo:
R version 4.4.1 (2024-06-14)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 22.04.4 LTS
brainGraph_3.1.0
igraph_1.6.0
Thank you for your time and assistance. Please let me know if you need any additional information to address this question.
Kikuko