**Stop: Design Matrix not found or inconsistent**

Hello,

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.

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:*

Hello,

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.

I am not sure I understand.

For example here are 4 rows from my design matrix

1 = patient, score, and then patient*score..

So if you are saying 'the result of the multiplication needs to be used in the design matrix' then wouldn't the first line be:

1 91 91

since 1x91 is 91? And then for the patients, it would be 0 for the third column?

1 91 1*91

1 90 1*90

0 117 0*117

0 132 0*132

Where can I find example matrices? I am really interested in NBS.. But I don't quite understand where I am going wrong with the design matrix.

Also, was the contrast I included correct?

Thanks again for any support..

*Western*

I am really lost. I have tried everything I can think of to run this analysis and I keep getting the same error...

The schizophrenia data set works on my Matlab. But, I updated my design matrix based on your suggestion and it is still not working.

Sorry to bother you, but helping me figure this out would be really appreciated..