I am calculating small world sigma and omega indices for structural covariance networks. Using your guide, I compute these measures using the following:
#Generate N number of for each group and density
kNumRand <- 1e2
#Turn clustering on. Ie., create random graph that controll for degree distribution and clustering.
clustering <- T
#Output random graph to disk and combine into ALL sub-directory
outdir <- paste0('data/rand')
#Calculate the small world parameters, along with global graph measures
#Calculate normalised rich-club coefficients and associated p values
rand_vars <- analysis_random_graphs(g, kNumRand, savedir=outdir,
clustering=clustering)
#Extract normalised rich-club coefficients and p-values
rich.dt <- rand_vars$rich
rich.dt <- rich.dt[complete.cases(rich.dt)] # Remove rows w/ NA
#Extract small world parameters and related information
small.dt <- rand_vars$small
#Extract graph-level measures for the random graphs
rand.dt <- rand_vars$rand
#Control for clustering
kNumRandClust <- 1e2# Create 100 graphs per group/density combination
g.rand <- small.clust.dt <- vector('list', length=length(groups))
for (i in seq_along(groups)) {
g.rand[[i]] <- vector('list', length=length(densities))
for (j in seq_along(densities)) {
g.rand[[i]][[j]] <- sim.rand.graph.par(g[[i]][[j]],
kNumRandClust, clustering=T)
}
small.clust.dt[[i]] <- small.world(g[[i]], g.rand[[i]])
}
small.clust.dt <- rbindlist(small.clust.dt)
small.clust.dt[, Group := rep(groups, each=length(densities))]
setkey(small.dt, Group, density)
setkeyv(small.clust.dt, key(small.dt))
small.dt[, omega := small.dt[, Lp.rand / Lp] - small.clust.dt[, Cp / Cp.rand]]
small.dt[, Lp.latt := small.clust.dt$Lp.rand]
small.dt[, Cp.latt := small.clust.dt$Cp.rand]
small.tidy <- melt(small.dt, id.vars=c('density', 'Group', 'N’))
What you will notice is the omega for the red group (control group) is no bounded by 0 - 1, as is intended. Is there any reason why this could be happening?
Let me know if any other information will make this easier to diagnose.