Hi Fabio,
The design matrix is correct.
The order of the columns does not matter. However, the contrast vector should be matched to the appropriate columns in the design matrix.
An intercept terms in NOT required because in this case you are modelling a separate mean for each individual. Including the interpcet will cause the matrix to be rank deficient.
You can consider a contrast of [0 0 0 1] or [0 0 0 -1], depending on the alternative hypothesis that you may wish to test.
Exchange blocks can be helpful for repeated measure designs like your one.
Best,
Andrew
Originally posted by Fabio Strappazzon:
Dear all,
I'm currently using your NBS toolbox for my network analysis.
Considering that I have to run a simple paired t-test with 3 subjects (obviously I have more of them but it's just for conceptualization), how do I set the design matrix?
1) Is this form correct?
[1 0 0 1
0 1 0 1
0 0 1 1
1 0 0 -1
0 1 0 -1
0 0 1 -1]
2) I see that in various threads the last condition column ( 1 1 1 -1 -1 -1) is put at the first column and in other threads at last like I did. Does it matter?
3) Do I need to include the intercept term [1 1 1 1 1 1] or does NBS take it automatically into consideration?
4) In this case the constrast could be expressed as [0 0 0 1]?
Many Thanks for any help
Threaded View
| Title | Author | Date |
|---|---|---|
| Fabio Strappazzon | Feb 13, 2026 | |
| Andrew Zalesky | 17 hours ago | |
