Dear Chris,
I was wondering whether it is possible to (statistically) test the difference between network edges, using the permute function. More specifcally, using the
count_inter function I would be able to sum the edges between and within networks (DMN, SN, ECN). I tried to adapt the function (see below) so it incorperates the new measure, but I'm doing something wrong as it gives the following error: task 1 failed - "error in evaluating the argument 'x' in selecting a method for function 't': inherits(g, "brainGraph") is not TRUE"
strength.diffs.perm <- function(g, densities) {
meas <- lapply(g, function(x) t(sapply(x, function(y) count_inter(y)$mat[1,1])))
meas.diff <- sapply(seq_along(V(g[[1]][[1]])), function(x)
brainGraph:::auc_diff(densities, cbind(meas[[1]][, x], meas[[2]][, x])))
tmp <- as.data.table(t(meas.diff))
setnames(tmp, 1:ncol(tmp), V(g[[1]][[1]])$name)
return(tmp)
}
Would it be possible to resolve this issue? Of maybe there's a different approach (e.g. using the "degree" function)? Ideally, I'd like to test the difference between groups (time 1/time 2) within each network, but also test the differences between network edges within one timepoint.
Many thanks in advance.
Best wishes, Femke