help > RE: Add covariates to existing connectivity matrices in CONN
Mar 20, 2025  02:03 PM | Alfonso Nieto-Castanon - Boston University
RE: Add covariates to existing connectivity matrices in CONN

Dear Abslab


To add control covariates to your second-level analysis when using conn_module('GLM',...) functionality, you simply need to add those control variables as additional columns of your design matrix and (typically) modify your contrast vector to also include 0's in the positions of those control variables. For example, if your original analysis was a two-sample t-test comparing two groups of subjects like the example provided in https://web.conn-toolbox.org/resources/c... then you could add an "age" control variable by using something like the following:


#design


1 1 1 1 1 1 1 0 0 0 0 0 0


0 0 0 0 0 0 0 1 1 1 1 1 1


24 28 25 28 28 22 21 29 27 20 29 25 25


#contrast_between


-1 1 0


where the third row in the #design field contains the age of each subject in your analysis, and the new 0 in the #contrast_between vector indicates that you would like to compare the two groups at the same level of the age covariate (ANCOVA)


Hope this helps


Alfonso


 


Originally posted by abslab:



Dear sirs,


I learned from the post "importing existing connectivity matrices in CONN" that I can import exist connection matrcies, e.g., structual connectivity data, to CONN for group analysis.


I have successfully created contrast and displayed the results using
conn_mtx_write, conn_module( 'glm'), and conn_display.


My question, how can I specify covariates, e.g., Age, for the imported matrices for group analysis?


I tried conn_module('glm', 'covariates', Age,....). But seems no effect on the results.



Thank you in advance for your help.
Abslab



 

Threaded View

TitleAuthorDate
abslab Mar 20, 2025
RE: Add covariates to existing connectivity matrices in CONN
Alfonso Nieto-Castanon Mar 20, 2025
abslab Mar 20, 2025