Hi Ozgun,
1) What version of "brainGraph" are you using? I thought I had already
fixed "brainGraph_GLM_design", but you can edit the function and add
the following line before the line first creating "X":
covars[, Study.ID := as.character(Study.ID)]
Alternatively, before calling "brainGraph_GLM_design" you can use the
above command in the console.
2) I was surprised the "con.mat" doesn't throw an error, but I see
that "Study.ID" was included in your design matrix, which is
incorrect. If you apply the fix above, then "X" will have 2 columns.
Your contrast of interest would then be [1 0] (because the "Group"
column will be moved and become the 2nd column), testing for the
linear relationship between nodal efficiency and "Score". You also do
not need to specify an interaction; see
https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/GLM#Single-Group_Average_with_Additional_Covariate
3) If the "g" object contains all subjects, and groups, and
thresholds/densities, then you will need to pass only a single
threshold/density. This can be done for example by the following
(assume you want the 10th threshold here):
result <- brainGraph_GLM(do.call(Map, c(c, g))[[10]], measure='E.nodal.wt', ...)
where "..." are the rest of your arguments. This appears to me to be
the source of your error.
4) I think using surface area is fine if the streamlines terminate
when they "hit" a surface.
I am nearing the end (I hope!) of a major, very large update to
v3.0.0. It simplifies a lot of things, in particular there will no
longer be list objects such as "g[[1]][[5]][[22]]" that are 3 "levels"
deep. My goal is to push the update to CRAN in the next ~10 days; at
the latest I hope to have it all done by the end of the month. You
could wait until then, and reprocess the data, but if you don't want
to wait then I think the above fix should work for you.
Chris
> 'threshold',+ 'Group', 'Study.ID', names(dt.G)[c(1:4,
> 6:23)]))Error in setcolorder(dt.G, c("modality", "atlas", "weighting",
> "sub.thresh", :
> neworder contains duplicates
>
>
>
>
> dt.G.tidy <- melt(dt.G, c(names(dt.G)[1:7], 'density'))Duplicate column
> --
> You received this message because you are subscribed to the Google Groups
> "brainGraph-help" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
brainGraph-he...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/brainGraph-help/e1d19b08-29ca-4375-a37f-8b7cb8b03e48%40googlegroups.com.
>