help > RE: Design matrix and contrast for 2x2 design
6 hours ago | Max Kathofer
RE: Design matrix and contrast for 2x2 design

I have a similar case in which a participant got once a placebo and once a drug and then did two tasks [high and low]. The explanation here was very helpful in creating a design matrix, so thank you very much! My study has 32 participants and since every participant has 4 matrices, I created a 128x34 matrix. The first column codes drug, the second highVSlow and the rest indicate to which participants they belong. So the first 4 files belonging to subject1 would look like this: 


Sub1PH   0 1 1 0 0 ... 
Sub1PL    0 0 1 0 0 ...
Sub1DH   1 1 1 0 0 ...
Sub1DL    1 0 1 0 0 ... 


The permutation blocks would then look like this [1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, ...]


is this correct? (also see attachment) 


However, 3 things are unclear cause they seem to contradict other posts in this forum:



  1. In other posts a column with only ones is additionally included to indicate a global mean. Why is this column here omitted? 
  2. Similar to the post above, I encoded drug: 0 for placebo and 1 for drug. Why do other posts recommend 1 and -1? I guess there is a difference but I could not figure it out...
  3. When I am interested in the contrast for 

main effect drug = [1 0 0 0 ..]  and for the decrease [-1 0 0 0]
main effect task = [0 1 0 0 .. ] (I guess this means high > low right?) 


I would run a t-test, right? And since I explore both drug > placebo [1 0 0 0 ..]  and placebo > drug [-1 0 0 0], I would need to half the significance to 0.025 to compensate for testing twice, right? Or would I actually need to divide alpha by 4 since I run both contrasts for both main effects to safeguard against alpha error accumulation? 


Thank you so much for your help! 


Cheers, 


Max 


 


 


 

Attachment: design_matrix.txt

Threaded View

TitleAuthorDate
David de Wide Aug 3, 2017
RE: Design matrix and contrast for 2x2 design
Max Kathofer 6 hours ago
yue zhang Jan 11, 2020
Andrew Zalesky Aug 5, 2017
Liam Nestor Sep 27, 2019
Andrew Zalesky Sep 28, 2019
Liam Nestor Sep 28, 2019
Andrew Zalesky Sep 28, 2019
Liam Nestor Sep 30, 2019
Andrew Zalesky Oct 1, 2019
Liam Nestor Oct 1, 2019
David de Wide Aug 6, 2017
Andrew Zalesky Aug 7, 2017
David de Wide Aug 7, 2017
Andrew Zalesky Aug 7, 2017
David de Wide Aug 11, 2017
Andrew Zalesky Aug 12, 2017
David de Wide Aug 18, 2017
Andrew Zalesky Aug 19, 2017