help > TSO effect in patients — design/contrast check
Showing 1-4 of 4 posts
Display:
Results per page:
Sep 16, 2025  08:09 AM | Ole Jonas Böken
TSO effect in patients — design/contrast check

Dear Prof. Zalesky,


I’d like to confirm a GLM setup in NBS to test whether time since onset (TSO) is associated with connectivity in patients, adjusting for age and sex (and optionally scanning protocol - because different scanners were used-, binary).


Column order: Intercept zTSO zAge Sex Prot
t-contrast for TSO: 0 1 0 0 0


Design matrix excerpt (first 5 rows):
1 0.8946343228017042 -0.004561935982568295 0 1
1 -0.6792377931049878 -0.04470697262916825 0 1
1 1.0143854620554744 -1.4096382186135632 0 0
1 -0.9529546828278908 0.2898349994258306 0 1
1 -0.8674181547894837 -0.6736458800925659 0 1


Questions:




  • Is this design and contrast correct for testing the TSO effect in patients only?




  • If I drop Prot when constant, I would use: Intercept zTSO zAge Sex; contrast: 0 1 0 0. Is that appropriate?




Thanks in advance,


Ole


 

Sep 16, 2025  11:09 AM | Andrew Zalesky
RE: TSO effect in patients — design/contrast check

Hi Ole, 


You may also want to test the contrast 0 -1 0 0 0. 


Other than that, everything looks ok. 


Andrew


Originally posted by Ole Jonas Böken:



Dear Prof. Zalesky,


I’d like to confirm a GLM setup in NBS to test whether time since onset (TSO) is associated with connectivity in patients, adjusting for age and sex (and optionally scanning protocol - because different scanners were used-, binary).


Column order: Intercept zTSO zAge Sex Prot
t-contrast for TSO: 0 1 0 0 0


Design matrix excerpt (first 5 rows):
1 0.8946343228017042 -0.004561935982568295 0 1
1 -0.6792377931049878 -0.04470697262916825 0 1
1 1.0143854620554744 -1.4096382186135632 0 0
1 -0.9529546828278908 0.2898349994258306 0 1
1 -0.8674181547894837 -0.6736458800925659 0 1


Questions:




  • Is this design and contrast correct for testing the TSO effect in patients only?




  • If I drop Prot when constant, I would use: Intercept zTSO zAge Sex; contrast: 0 1 0 0. Is that appropriate?




Thanks in advance,


Ole


 



 

Sep 17, 2025  12:09 PM | Ole Jonas Böken
RE: TSO effect in patients — design/contrast check

Dear Prof. Zalesky,


Thank you for your quick reply! As a quick follow-up, we would like to clarify whether our design matrix adequately captures a paired design (last vs. first session) when including the covariates TSO and protocol.


Our current setup is:


Intercept, PrevsPost, TSO, Protocol
1, -1, -0.9964, 1
1, 1, 1.3098, 0
1, -1, -1.3889, 1
1, 1, 0.7455, 0


together with exchange blocks [1;1;2;2].


However, in FSL paired designs are typically modeled with additional subject-specific EVs to explicitly account for within-subject differences, leading to:


Intercept, PrevsPost, TSO, Protocol, EV1, EV2
1, -1, -0.9964, 1, 1, 0
1, 1, 1.3098, 0, 1, 0
1, -1, -1.3889, 1, 0, 1
1, 1, 0.7455, 0, 0, 1


This raised the question whether our first specification with exchange blocks already provides valid inference, or whether subject-specific EVs (as in the FSL approach) are required in addition.


Many thanks in advance.


Best,


Ole


Sep 18, 2025  12:09 AM | Andrew Zalesky
RE: TSO effect in patients — design/contrast check

Hi Ole,


This is not the correct setup for a within-subjects design. A column should be included for each subject to model there individual mean and the first column of 1's should be removed. Protcol can be removed if it is orthogonal with session. 


The 2nd design matrix is more correct. But the first colums of 1's should be removed and you may want to check whether Protocol is orthogonal to the other variates. 


NBS/FSL use a very similar modeling stategy. 


Andrew


Originally posted by Ole Jonas Böken:




Dear Prof. Zalesky,


Thank you for your quick reply! As a quick follow-up, we would like to clarify whether our design matrix adequately captures a paired design (last vs. first session) when including the covariates TSO and protocol.


Our current setup is:


Intercept, PrevsPost, TSO, Protocol
1, -1, -0.9964, 1
1, 1, 1.3098, 0
1, -1, -1.3889, 1
1, 1, 0.7455, 0


together with exchange blocks [1;1;2;2].


However, in FSL paired designs are typically modeled with additional subject-specific EVs to explicitly account for within-subject differences, leading to:


Intercept, PrevsPost, TSO, Protocol, EV1, EV2
1, -1, -0.9964, 1, 1, 0
1, 1, 1.3098, 0, 1, 0
1, -1, -1.3889, 1, 0, 1
1, 1, 0.7455, 0, 0, 1


This raised the question whether our first specification with exchange blocks already provides valid inference, or whether subject-specific EVs (as in the FSL approach) are required in addition.


Many thanks in advance.


Best,


Ole