help > NBS-NBR tool
Showing 1-6 of 6 posts
Display:
Results per page:
Dec 15, 2021  05:12 PM | Annalisa Lella
NBS-NBR tool
I have been using NBS and NBR packages in R. I found different results using the same data. What I noticed is that in NBR results the components are based on the edges and so the FWEp-values while in NBS results the components are based on the nodes and so the FWEp-values. Am I wrong?

Thanks so much, Annalisa
Dec 15, 2021  09:12 PM | Andrew Zalesky
RE: NBS-NBR tool
Hi Annalisa, 

Component sizes for NBS are based on edges, not nodes. Can you clarify why you think that they are based on nodes? 

NBS and NBR should be equivalent. However, there may be differences in the way the statistical model is implemented between R and Matlab. Even so, the results should be largely comparable. 

best,
Andrew
Originally posted by Annalisa Lella:
I have been using NBS and NBR packages in R. I found different results using the same data. What I noticed is that in NBR results the components are based on the edges and so the FWEp-values while in NBS results the components are based on the nodes and so the FWEp-values. Am I wrong?

Thanks so much, Annalisa
Dec 15, 2021  10:12 PM | Annalisa Lella
RE: NBS-NBR tool
Thanks so much for your reply.

I got different results. I can easly manipulate the contrasts in the NBS package but I can't do the same in the NBR package so I thought that this is the reason of such a huge difference. Is it possibile?

From the NBR package I got different components and each element of the component is an edge. Indeed I get the coordinates of each edge. That's clear. On the other hand, from NBS I get a T.max and the components: each components has a different number of what I think are nodes because of this part of the scripts:

clusts <- components(graph_from_adjacency_matrix(T.max[, , j], diag=FALSE,
mode='undirected', weighted=TRUE)).

So if I insert here the output T.max I get the components and a vector of nodes called "membership" which says in which component each node is placed. Indeed the number of nodes associated to a components correspond to the output of the NBS. That's why I think that the components in NBS are based on nodes. Where am I wrong? I attached you a file so I can explain myself better! Thanks so much for your help. I really want to understand it. 

Thanks,
Annalisa
Dec 16, 2021  11:12 PM | Andrew Zalesky
RE: NBS-NBR tool
Hi Annalisa

You may want to contact the developer of NBR, Zeus Gracia: zgtabuenca@comunidad.unam.mx

For NBS, I can assure you that component sizes are measured based on edges, not nodes. 

It is however feasible to measure size based on nodes and this may be the strategy used in NBR (need to check with Zeus). 

Apologies for not being able to provide a more helpful response, but hopefully Zeus can add some clarity. 

best, 
Andrew
Originally posted by Annalisa Lella:
Thanks so much for your reply.

I got different results. I can easly manipulate the contrasts in the NBS package but I can't do the same in the NBR package so I thought that this is the reason of such a huge difference. Is it possibile?

From the NBR package I got different components and each element of the component is an edge. Indeed I get the coordinates of each edge. That's clear. On the other hand, from NBS I get a T.max and the components: each components has a different number of what I think are nodes because of this part of the scripts:

clusts <- components(graph_from_adjacency_matrix(T.max[, , j], diag=FALSE,
mode='undirected', weighted=TRUE)).

So if I insert here the output T.max I get the components and a vector of nodes called "membership" which says in which component each node is placed. Indeed the number of nodes associated to a components correspond to the output of the NBS. That's why I think that the components in NBS are based on nodes. Where am I wrong? I attached you a file so I can explain myself better! Thanks so much for your help. I really want to understand it. 

Thanks,
Annalisa
Dec 17, 2021  12:12 AM | Andrew Zalesky
RE: NBS-NBR tool
Send through your email, I will loop you into an email with Zeus. 


Originally posted by Andrew Zalesky:
Hi Annalisa

You may want to contact the developer of NBR, Zeus Gracia: zgtabuenca@comunidad.unam.mx

For NBS, I can assure you that component sizes are measured based on edges, not nodes. 

It is however feasible to measure size based on nodes and this may be the strategy used in NBR (need to check with Zeus). 

Apologies for not being able to provide a more helpful response, but hopefully Zeus can add some clarity. 

best, 
Andrew
Originally posted by Annalisa Lella:
Thanks so much for your reply.

I got different results. I can easly manipulate the contrasts in the NBS package but I can't do the same in the NBR package so I thought that this is the reason of such a huge difference. Is it possibile?

From the NBR package I got different components and each element of the component is an edge. Indeed I get the coordinates of each edge. That's clear. On the other hand, from NBS I get a T.max and the components: each components has a different number of what I think are nodes because of this part of the scripts:

clusts <- components(graph_from_adjacency_matrix(T.max[, , j], diag=FALSE,
mode='undirected', weighted=TRUE)).

So if I insert here the output T.max I get the components and a vector of nodes called "membership" which says in which component each node is placed. Indeed the number of nodes associated to a components correspond to the output of the NBS. That's why I think that the components in NBS are based on nodes. Where am I wrong? I attached you a file so I can explain myself better! Thanks so much for your help. I really want to understand it. 

Thanks,
Annalisa
Dec 21, 2021  06:12 AM | Andrew Zalesky
RE: NBS-NBR tool
Comments from Zeus: 


Hope this answer helps Annalisa:

NBR outputs an R's list object. That list has several sublists within. The first sublist 'components' has a matrix for each explanatory variable introduced in your LM or LME. Those matrices include all the edges that are above the a priori threshold, the first column tells the position of the corresponding edge in the upper triangle position, the 2nd and 3rd columns indicate the nodes that are connected by that edge, and the 4th column indicates to which cluster of components belong that edge. Is that the info you are searching for? The next sublist 'fwe' targets those values and include the FWE of those clusters.
In the tests I performed, at the edge level the t- or F-statistic from NBS and NBR are practically the same, the decimals may vary because in NBS are calculated via general linear hypothesis testing (GLHT) and in NBR it takes the R-base LM functions. But yes, the contrast is very different in both softwares, NBS use vectors while NBR use formulas, which may be confusing. Also, in my tests the components extraction of both softwares match.
Let me know if I missed something, for sure you can forward me the aforementioned file so I can take a look,
Kind regards,
Zeus.

Originally posted by Andrew Zalesky:
Send through your email, I will loop you into an email with Zeus. 


Originally posted by Andrew Zalesky:
Hi Annalisa

You may want to contact the developer of NBR, Zeus Gracia: zgtabuenca@comunidad.unam.mx

For NBS, I can assure you that component sizes are measured based on edges, not nodes. 

It is however feasible to measure size based on nodes and this may be the strategy used in NBR (need to check with Zeus). 

Apologies for not being able to provide a more helpful response, but hopefully Zeus can add some clarity. 

best, 
Andrew
Originally posted by Annalisa Lella:
Thanks so much for your reply.

I got different results. I can easly manipulate the contrasts in the NBS package but I can't do the same in the NBR package so I thought that this is the reason of such a huge difference. Is it possibile?

From the NBR package I got different components and each element of the component is an edge. Indeed I get the coordinates of each edge. That's clear. On the other hand, from NBS I get a T.max and the components: each components has a different number of what I think are nodes because of this part of the scripts:

clusts <- components(graph_from_adjacency_matrix(T.max[, , j], diag=FALSE,
mode='undirected', weighted=TRUE)).

So if I insert here the output T.max I get the components and a vector of nodes called "membership" which says in which component each node is placed. Indeed the number of nodes associated to a components correspond to the output of the NBS. That's why I think that the components in NBS are based on nodes. Where am I wrong? I attached you a file so I can explain myself better! Thanks so much for your help. I really want to understand it. 

Thanks,
Annalisa