help > RE: Stop: Design Matrix not found or inconsistent
Nov 4, 2023  12:11 AM | Andrew Zalesky
RE: Stop: Design Matrix not found or inconsistent

The result of the multiplication needs to be used in the design matrix.

E.g. Instead of 3*2, use 6 in the design matrix. 

Check out some of the example design matrices. 

Originally posted by deryaadil:


I am currently working on a study involving network-based statistical analysis and have encountered an issue with the design matrix in the dnbs connectome package.

Specifically, when attempting to run the analysis, I am receiving the error message "stop: design matrix not found or inconsistent." I have carefully reviewed my design matrix file and contrast, but I'm struggling to identify the source of the problem.

For context, my design matrix is organized with columns representing group indicators (1 for patients, 0 for controls), visual perception scores, and their interaction terms. For more insight, I have 14 participants in each group, and they all have their own score included in the design matrix.

Sample Design Matrix Format:

1 Score_1 1*Score_1

1 Score_2 1*Score_2


0 Score_1 0*Score_1

0 Score_2 0*Score_2


Regarding the contrast, I have chosen `[0, 0, 1]` to emphasize the interaction term, as I am particularly interested in understanding how the relationship between group membership and functional connectivity is affected by visual perception scores.

I have also created a dedicated folder named 'Z' within my matrices directory to organize the connectivity matrices. This is a 34x34 matrix and it does say NaN where applicable (going diagonally). I wasn't sure if I needed to replace this with something else? I have a 34x34 matrix since I am interested in 34 ROI's.

Could you please provide guidance on why I might be encountering this error message and if there are any specific checks I should perform in my design matrix setup? Additionally, if you have any recommendations for refining my contrast choice or folder organization, I would greatly appreciate your expertise.

This is my first time trying nbs, so any help would be valuable. Thank you very much for your time and assistance. 


Threaded View

Removed Removed Nov 3, 2023
Removed Removed Nov 4, 2023
derya Nov 4, 2023
RE: Stop: Design Matrix not found or inconsistent
Andrew Zalesky Nov 4, 2023