help > Design Matrix and Contrast for within-design
Showing 1-2 of 2 posts
Display:
Results per page:
Nov 3, 2018  05:11 PM | preini
Design Matrix and Contrast for within-design
Dear Andrew,

thanks for the NBS and your support here, it is very much appreciated.

I have a within-subjects design with 2 conditions: DRUG or PLACEBO. I want to look into possible differences in connectivity depending on the condition.

I have some issues with the setup, so I wanted
to reassure that all my settings are correct. I reran my analyses because of messy data and I replaced 2 matrices. 
I coded the Design Matrix in another way, but now, strange thing is that nothing reaches significance, although it did before
I assume that something in my setup is not correct. 


I organized my data as follows (C=Condition, S=Subject) - with 3 subjects as an example (I have 39 subjects, participating in 2 Sessions, Drug or Placebo)
Condition 1 is DRUG, Condition 2 is PLACEBO.

C1_S1
C1_S2 
C1_S3
C2_S1
C2_S2
C2_S3

My DM below:
 1 1 0 0 
 1 0 1 0 
 1 0 0 1 
-1 1 0 0 
-1 0 1 0 
-1 0 0 1 

Exchange Blocks and the Contrast:

Contrast 
1 0 0 0  

Exchange Blocks:
[1 2 3 ; 1 2 3 ]



Then I tried to model my subjects like this:

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

with a contrast of

[1 0]

which worked fine: thresholding now showed an effect again, but it's probably the wrong DM for a paired/within design?



My question now is, for my within subjects design, which is the correct Design Matrix? 
I assume the second one is correct, but I am not sure about it, so it would be great if you could help me! 
Would be also great if you could help me with the exchange blocks in case of the correctly identified DM. 

Thanks a lot in advance! 

Sincerely,
rinie
Nov 4, 2018  11:11 AM | Andrew Zalesky
RE: Design Matrix and Contrast for within-design
Hi Rinie,

The second design matrix (two columns only) is not a within-subjects design. Also, the contrast for this design matrix should be [-1 1] or [1 -1]. Select t-test for this design matrix.

The first design matrix (four columns) is the correct one for a within-subjects design. An F-test is ok for this design matrix, but you can also use a t-test with the contrasts of [1 0 0 0] or [-1 0 0 0]. The t-test is one-tailed while the F-test is two-tailed in this case.

Andrew


Originally posted by preini:
Dear Andrew,

thanks for the NBS and your support here, it is very much appreciated.

I have a within-subjects design with 2 conditions: DRUG or PLACEBO. I want to look into possible differences in connectivity depending on the condition.

I have some issues with the setup, so I wanted
to reassure that all my settings are correct. I reran my analyses because of messy data and I replaced 2 matrices. 
I coded the Design Matrix in another way, but now, strange thing is that nothing reaches significance, although it did before
I assume that something in my setup is not correct. 


I organized my data as follows (C=Condition, S=Subject) - with 3 subjects as an example (I have 39 subjects, participating in 2 Sessions, Drug or Placebo)
Condition 1 is DRUG, Condition 2 is PLACEBO.

C1_S1
C1_S2 
C1_S3
C2_S1
C2_S2
C2_S3

My DM below:
 1 1 0 0 
 1 0 1 0 
 1 0 0 1 
-1 1 0 0 
-1 0 1 0 
-1 0 0 1 

Exchange Blocks and the Contrast:

Contrast 
1 0 0 0  

Exchange Blocks:
[1 2 3 ; 1 2 3 ]



Then I tried to model my subjects like this:

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

with a contrast of

[1 0]

which worked fine: thresholding now showed an effect again, but it's probably the wrong DM for a paired/within design?



My question now is, for my within subjects design, which is the correct Design Matrix? 
I assume the second one is correct, but I am not sure about it, so it would be great if you could help me! 
Would be also great if you could help me with the exchange blocks in case of the correctly identified DM. 

Thanks a lot in advance! 

Sincerely,
rinie