help > RE: How to add the covariates in the design matrix , contrast and exchange blocks for 2x2 design?
Jan 12, 2020  11:01 PM | Andrew Zalesky
RE: How to add the covariates in the design matrix , contrast and exchange blocks for 2x2 design?
Hi Zhangyue,

The design matrix and contrast appears to be correct.

The exchange block should be: [ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]

You could also try without the exchange block (just leave the option empty).

You can add additional confounds simply by adding additional columns to the design matrix and putting a 0 in the contrast for the columns. However, for most repeated measures designs it does not make sense to include sex (and possibly age) as confounds because the sex of the individual does not change. If a subject is a male in the pre condition he will still be a male in the post condition. So there is no need to control for sex in this case. 

Andrew


Originally posted by yue zhang:
Dear Andrew
    Thank you for your quick reply. I have learned a lot under your guidance.
    I kind of understand the contrast, but just want to double check with you the individual means of the design matrix.
    If there are 8 pateints in each group, My design matrix is as foliows. My contrast for the interaction effect is [0 1 0 0 0 0 0 0] or [0 -1 0 0 0 0 0 0]; My exchange blocks is [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2]. Are they correct?
    I also want to enter covariates such as head movement,age,sex and body mass index. How to modify my design matrix, and Where can I add it in the software interface of NBS ? Thank you very much.

Sincerely,
zhangyue

Sham-pre: -1 1 1 0 0 0 0 0 ----subject1
Sham-pre: -1 1 0 1 0 0 0 0 ----subject2
Sham-pre: -1 1 0 0 1 0 0 0 ----subject3
Sham-pre: -1 1 0 0 0 1 0 0 ----subject4
Sham-pre: -1 1 0 0 0 0 1 0 ----subject5
Sham-pre: -1 1 0 0 0 0 0 1 ----subject6
Sham-pre: -1 1 0 0 0 0 0 0 1 ----subject7
Sham-pre: -1 1 0 0 0 0 0 0 0 1 ----subject8
Active-pre: -1 -1 0 0 0 0 0 0 0 0 1 ----subject9
Active-pre: -1 -1 0 0 0 0 0 0 0 0 0 1 ----subject10
Active-pre: -1 -1 0 0 0 0 0 0 0 0 0 0 1 ---- subject11
Active-pre: -1 -1 0 0 0 0 0 0 0 0 0 0 0 1---- subject12
Active-pre: -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 ----subject13
Active-pre: -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 ----subject14
Active-pre: -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 ---- subject15
Active-pre: -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 ---- subject16
Sham-post: 1 -1 1 0 0 0 0 0 ----subject1
Sham-post: 1 -1 0 1 0 0 0 0 ----subject2
Sham-post: 1 -1 0 0 1 0 0 0 ----subject3
Sham-post: 1 -1 0 0 0 1 0 0 ----subject4
Sham-post: 1 -1 0 0 0 0 1 0 ----subject5
Sham-post: 1 -1 0 0 0 0 0 1 ----subject6
Sham-post: 1 -1 0 0 0 0 0 0 1 ----subject7
Sham-post: 1 -1 0 0 0 0 0 0 0 1 ----subject8
Active-post: 1 1 0 0 0 0 0 0 0 0 1 ----subject9
Active-post: 1 1 0 0 0 0 0 0 0 0 0 1 ----subject10
Active-post: 1 1 0 0 0 0 0 0 0 0 0 0 1 ---- subject11
Active-post: 1 1 0 0 0 0 0 0 0 0 0 0 0 1---- subject12
Active-post: 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 ----subject13
Active-post: 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 ----subject14
Active-post: 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 ---- subject15
Active-post: 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 ---- subject16

Threaded View

TitleAuthorDate
yue zhang Jan 12, 2020
yue zhang Jan 14, 2020
RE: How to add the covariates in the design matrix , contrast and exchange blocks for 2x2 design?
Andrew Zalesky Jan 12, 2020