1 x 3 within-subjects design and contrasts

10 views
Skip to first unread message

Nathan Petro

unread,
Dec 26, 2025, 1:47:44 PM12/26/25
to SwE-Toolbox Support
Greetings,
My colleague and I wish to use SwE to look at the main effect of visit (3 visits per participant), and wanted to confirm our design matrix and contrast are correct even if it is pretty simple. The main item I want to confirm is whether we need to model a "global" intercept in our design matrix. My intuition is that the answer is "no", but thought it best to confirm.

We input the scans organized as:
sub01_visit1
sub01_visit2
sub01_visit3
sub02_visit1
sub02_visit2
sub03_visit3
... and so on

we input a vector of numbers to specify each subject:
1
1
1
2
2
2
... and so on

We used the "classic" method and as such did not specify any groups.

We made 3 covariates to define each visit:
v1 v2 v3
1 0 0
0 1 0
0 0 1
1 0 0
0 1 0
0 0 1

To look at the main effect of visit, we specified an F-contrast:
1 -1 0
0 1 -1

Does this sufficiently model and estimate the main effect of visit? 

Is it correct that no intercept is needed? By intercept, I mean a vector of 1s equal to the number of scans, entered as a covariate. In this case, the intercept would be weighted as 0 in the F-contrast.


Thanks so much for the great toolbox and for your previous help!
Reply all
Reply to author
Forward
0 new messages