help > 2x2 anova F test threshold
Showing 1-6 of 6 posts
Display:
Results per page:
Jul 27, 2023  02:07 PM | athenastein
2x2 anova F test threshold

Hi Andrew, 


Thank you for creating such a great tool. 


I have used the previous posts on the forum to create a design matrix and contrasts for a 2x2 ANOVA. However, I had a question about my contrasts and f-test threshold. 


I have two treatment groups (A,B) at two timepoints (T1, T2). Approx half of subs got treatment A (n=6), and half treatment B (n=4), so my design matrix is as follows (without headings and column 1 of course). 



As there is repeated measures (T1, T2) I have used exchange blocks: 


1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2
2


 I am interested in the changes at T2, taking into account T1, for A (less than) B and A (greater than) B. My questions are:


1. Is this design matrix and exchange blocks correct?
2. Is it correct to mainly focus on the contrasts: [1, -1, -1, 1, 0] and [-1, 1, -1, 1, 0], reflecting A (greater than) B at T2 timepoint, and A (less than) B at T2? Does this take into account T1 in any way, or is it exclusively at the post timepoint (sorry if silly question)?
3. If no, how can I control for pre (T1) timepoint?
4. Given that F= t^2, does my F test threshold need to be  9.61 to reflect a default t stat of 3.1? 


Thank you! 


Athena

Jul 29, 2023  01:07 AM | Andrew Zalesky
RE: 2x2 anova F test threshold

Hi Athena, 


If this is a repeated measures design, an additional column should be included for each subject. The columns would be zeros everywhere except for 1's at the rows pertaining to the subjects. These additional columns model the within-subject means. 



  • There is no need to include age as a covariate in a repeated measures design when the within-subject mean is modeled.

  • Only a single column is needed to model the group effect. A single column is also sufficient to model the time effect. 

  • Yes, F=t^2. So the primary threshold should be increased for an F-statistic. 

  • I'm not quite sure what you mean by controlling for the T1 timepoint. 

  • It might be helpful to consult with some of the previous posts on 2x2 designs. 


best, 


Andrew


Originally posted by athenastein:



Hi Andrew, 


Thank you for creating such a great tool. 


I have used the previous posts on the forum to create a design matrix and contrasts for a 2x2 ANOVA. However, I had a question about my contrasts and f-test threshold. 


I have two treatment groups (A,B) at two timepoints (T1, T2). Approx half of subs got treatment A (n=6), and half treatment B (n=4), so my design matrix is as follows (without headings and column 1 of course). 



As there is repeated measures (T1, T2) I have used exchange blocks: 


1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2
2


 I am interested in the changes at T2, taking into account T1, for A (less than) B and A (greater than) B. My questions are:


1. Is this design matrix and exchange blocks correct?
2. Is it correct to mainly focus on the contrasts: [1, -1, -1, 1, 0] and [-1, 1, -1, 1, 0], reflecting A (greater than) B at T2 timepoint, and A (less than) B at T2? Does this take into account T1 in any way, or is it exclusively at the post timepoint (sorry if silly question)?
3. If no, how can I control for pre (T1) timepoint?
4. Given that F= t^2, does my F test threshold need to be  9.61 to reflect a default t stat of 3.1? 


Thank you! 


Athena



 

Aug 2, 2023  12:08 PM | athenastein
RE: 2x2 anova F test threshold

Hi Andrew 


I have revised my design matrix based on your advice and previous posts. Could I please check that this is now correct, where n=6 subs receive dosage A and n=4 subs receive dosage B? 


 


No description available.


For contrasts - would these be correct to model the interaction between dosage (groups: A,B) and time (repeated measures: T1, T2)? 


[1,1,0,0,0,0,0,0,0,0,0,0]


[-1,-1,0,0,0,0,0,0,0,0,0,0]


 


I suppose my exchange blocks would be the same as my 'main effect time' column?


 


Thanks for all your help. 


Kind regards


Athena


 


 


 

Aug 3, 2023  04:08 AM | Andrew Zalesky
RE: 2x2 anova F test threshold

Hi Athena, 


the design matrix looks good. 


However, to model an interaction between dosage and time, you will need to add a new interaction column. 


The interaction column is simply the multiplication of the time and dosage column. For example, the value of the interaction column for the first row is 1 x 0 = 0. 


The contrast for the interaction would be:


[0 0 1 0 0 0 ...] and [0 0 -1 0 0 ...] The 1 and -1 indicate the interaction column. 


Important: If you add the interaction column, please remember to delete the column correspondign to the main effect of dosage otherwise you will get a rank deficient warning. 


Andrew


 


Originally posted by athenastein:



Hi Andrew 


I have revised my design matrix based on your advice and previous posts. Could I please check that this is now correct, where n=6 subs receive dosage A and n=4 subs receive dosage B? 


 


No description available.


For contrasts - would these be correct to model the interaction between dosage (groups: A,B) and time (repeated measures: T1, T2)? 


[1,1,0,0,0,0,0,0,0,0,0,0]


[-1,-1,0,0,0,0,0,0,0,0,0,0]


 


I suppose my exchange blocks would be the same as my 'main effect time' column?


 


Thanks for all your help. 


Kind regards


Athena


 


 


 



 

Aug 3, 2023  06:08 AM | athenastein
RE: 2x2 anova F test threshold

Hi Andrew


I think I understand, thank you.  Just wanted to finally confirm that this design matrix is correct? 



 


contrasts [0,1,0,0,0...] and [0, -1, 0,0,0...] ?


 


I have one final question - right now the design matrix is testing whether dosage A is greater than dosage B, I think? If I want to check the other direction of relationship (e.g. dosage B is greater than A), should I have a second design matrix where the 0's and 1's in 'main effect dosage' are the other way around? (e.g. 1s in dosage B and 0s in dosage A?) Obviously then the interaction column will reflect this. 


 


Thank you


Athena

Aug 3, 2023  11:08 AM | Andrew Zalesky
RE: 2x2 anova F test threshold

 


Everything looks correct.


 


You should not need a 2nd design matrix. Using [0,1,0,0,0...] or [0, -1, 0,0,0...] should give you all the information that you need about the interaction term. 


Reversing the 1's and 0's should give you the same result. Try it!


Originally posted by athenastein:



Hi Andrew


I think I understand, thank you.  Just wanted to finally confirm that this design matrix is correct? 



 


contrasts [0,1,0,0,0...] and [0, -1, 0,0,0...] ?


 


I have one final question - right now the design matrix is testing whether dosage A is greater than dosage B, I think? If I want to check the other direction of relationship (e.g. dosage B is greater than A), should I have a second design matrix where the 0's and 1's in 'main effect dosage' are the other way around? (e.g. 1s in dosage B and 0s in dosage A?) Obviously then the interaction column will reflect this. 


 


Thank you


Athena