create_mats with threshold.by='density'

5 views
Skip to first unread message

Syam Gadde

unread,
May 31, 2019, 2:33:25 PM5/31/19
to brainGraph-help
Hi,

I've run create_mats with threshold.by='threshold' in the past, and multi-threshold permutation correction gave me nice graphs, showing how the significance of the contrast of interest changes with different thresholds.

Now, I'm trying threshold.by='density' and after seeing that MTPC gives essentially flat lines across the different thresholds/densities, I discovered that the output of create_mats when using threshold.by='density' (A.norm.sub, in particular) is the same for every threshold/density.  I wasn't expecting that -- is this normal?

I know it's hard to say for certain without actual data, but here is my create_mats call (based on examples from the manual) and the values of various variables I send to it:

    my.mats <- create_mats(matfiles$A,
                           modality=modality,
                           divisor='none',
                           threshold.by=threshold.by,
                           mat.thresh=thresholds,
                           sub.thresh=sub.thresh,
                           algo='probabilistic',
                           inds=inds,
                           )

> modality
[1] "dti"
> threshold.by
[1] "density"
> thresholds
 [1] 0.40 0.39 0.38 0.37 0.36 0.35 0.34 0.33 0.32 0.31 0.30 0.29 0.28 0.27 0.26
[16] 0.25 0.24 0.23 0.22 0.21 0.20 0.19 0.18 0.17 0.16 0.15 0.14 0.13 0.12 0.11
[31] 0.10 0.09 0.08 0.07 0.06 0.05
> sub.thresh
[1] 0.5
> inds
[[1]]
 [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
[26] 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
[51] 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69

[[2]]
 [1]  70  71  72  73  74  75  76  77  78  79  80  81  82  83  84  85  86  87  88
[20]  89  90  91  92  93  94  95  96  97  98  99 100 101 102 103 104 105 106 107
[39] 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
[58] 127 128 129 130 131 132 133 134 135 136 137 138 139

[[3]]
 [1] 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
[20] 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177

[[4]]
 [1] 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
[20] 197 198 199 200 201 202 203 204 205 206 207 208



-syam

Chris Watson

unread,
May 31, 2019, 7:50:50 PM5/31/19
to brainGr...@googlegroups.com
I would need to know more information. For instance,

1. What do you mean by "flat line"? Are you referring to the statistics plots (i.e., Figure 9.1 of the User Guide)? What is the value at all densities? If it is equal to 0, then that means the contrast is equal to 0 across thresholds. It would depend on what the contrast is, but that indicates that the left- and right-hand sides of the equation are identical. If you are looking at a difference between 2 groups, then their graph (or vertex, whichever you are testing) metrics are the same.
2. What do you mean "A.norm.sub" is the same for every density? Are you saying that, for example, the matrix for "group 1 subject 1" is the same whether you had specified a density of 0.40 or 0.05? This is definitely not expected behavior and I would need to see your specific data to understand why this would occur.

Chris

--
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 post to this group, send email to brainGr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/f3dc8ae4-c806-49b6-83f4-d353d4f6e814%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Syam Gadde

unread,
Jun 3, 2019, 9:39:42 AM6/3/19
to brainGr...@googlegroups.com
Thanks for your helpful response.

1. The graphs I referred to come from section 9.5 of the manual
(version 2.7.0) where the lines presumably show the betas, and the
shading shows significance? I only plotted the significant regions,
and most of them were not zero but some number that was consistently
significant across densities, however that is probably because...

2. ... yes, the values of A.norm.sub are the same across densities, at
least until the last one:

> min(A.norm.sub[[1]] == A.norm.sub[[1]])
[1] 1
> min(A.norm.sub[[1]] == A.norm.sub[[10]])
[1] 1
> min(A.norm.sub[[1]] == A.norm.sub[[20]])
[1] 1
> min(A.norm.sub[[1]] == A.norm.sub[[30]])
[1] 1
> min(A.norm.sub[[1]] == A.norm.sub[[35]])
[1] 1
> min(A.norm.sub[[1]] == A.norm.sub[[36]])
[1] 0

I will do some investigation and see if I can figure out why this
might be the case, and will report back. Thanks for validating,

-syam
> To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/CAHVz74gMQtbk7f_EyyvoF%3DS0sUWkn10eJicLGd50ths5CTa0sw%40mail.gmail.com.

Syam Gadde

unread,
Jun 3, 2019, 12:10:52 PM6/3/19
to brainGr...@googlegroups.com
Reporting back -- it seems this is because I used way higher density
values than was warranted for this sparse data set. Only the last
threshold was lower than the maximum density of the input data. I
will re-run will a lower threshold range, and will expect better
results. Thanks again for your help!

-syam

Chris Watson

unread,
Jun 3, 2019, 1:38:53 PM6/3/19
to brainGr...@googlegroups.com
I am glad you discovered the cause. If you have more issues, let me know.

Chris

P.S. Is your data inherently very sparse? That is, is this expected? Usually structural connectivity will be quite dense. Your latest emails suggest to me that there are not enough non-zero values to even create a connectivity matrix with 6% density. Additionally, the "sub.thresh" variable can affect the results; lowering this value would change things but it is not necessarily recommended.

Reply all
Reply to author
Forward
0 new messages