help > ANCOVA interaction effect
Showing 1-4 of 4 posts
Sep 29, 2017 06:09 PM | Hua Yu
ANCOVA interaction effect
Dear experts,
I have a question about the design matrix and contrast about the interactions between bipolar disorder subtypes and YMRS/HAMD scores in NBS. I have for example 6 manic patients and 4 depressive patients, and I also have the YMRS scores for each patient. I build my design matrix like the following,
1 -1 -1 1 19
1 -1 -1 1 21
1 -1 -1 1 22
1 -1 1 -1 32
1 -1 1 -1 22
1 -1 1 -1 21
1 1 -1 -1 6
1 1 -1 -1 7
1 1 1 1 4
1 1 1 1 5
Do you think the design matrix is right or not? Now I want to build a contrast to look at the interaction between subtype and YMRS scores, how should I build it? And also an other question, does the sample size need to be equivalent between the two subgroups and also the number of sample size should not be odd numbers?
Many thanks,
Hua
I have a question about the design matrix and contrast about the interactions between bipolar disorder subtypes and YMRS/HAMD scores in NBS. I have for example 6 manic patients and 4 depressive patients, and I also have the YMRS scores for each patient. I build my design matrix like the following,
1 -1 -1 1 19
1 -1 -1 1 21
1 -1 -1 1 22
1 -1 1 -1 32
1 -1 1 -1 22
1 -1 1 -1 21
1 1 -1 -1 6
1 1 -1 -1 7
1 1 1 1 4
1 1 1 1 5
Do you think the design matrix is right or not? Now I want to build a contrast to look at the interaction between subtype and YMRS scores, how should I build it? And also an other question, does the sample size need to be equivalent between the two subgroups and also the number of sample size should not be odd numbers?
Many thanks,
Hua
Sep 30, 2017 12:09 AM | Andrew Zalesky
RE: ANCOVA interaction effect
Hi Yu,
You have not described what the 5 columns of your design matrix model.
I suggest the following design: a column of 1's to model the intercept, a column of 1's and -1's to model manic/depressive, a column for the YMRS score and a column for the interaction between subtype and YMRS score. The column for the interaction is formed my multiplying the 2nd column by the 3rd column. So you should have 4 columns in total.
The contrast would be [0 0 0 1] or [0 0 0 -1]. Select t-test.
10 patients is most likely not sufficient to address this hypothesis (interaction effect).
Andrew
Originally posted by Hua Yu:
You have not described what the 5 columns of your design matrix model.
I suggest the following design: a column of 1's to model the intercept, a column of 1's and -1's to model manic/depressive, a column for the YMRS score and a column for the interaction between subtype and YMRS score. The column for the interaction is formed my multiplying the 2nd column by the 3rd column. So you should have 4 columns in total.
The contrast would be [0 0 0 1] or [0 0 0 -1]. Select t-test.
10 patients is most likely not sufficient to address this hypothesis (interaction effect).
Andrew
Originally posted by Hua Yu:
Dear experts,
I have a question about the design matrix and contrast about the interactions between bipolar disorder subtypes and YMRS/HAMD scores in NBS. I have for example 6 manic patients and 4 depressive patients, and I also have the YMRS scores for each patient. I build my design matrix like the following,
1 -1 -1 1 19
1 -1 -1 1 21
1 -1 -1 1 22
1 -1 1 -1 32
1 -1 1 -1 22
1 -1 1 -1 21
1 1 -1 -1 6
1 1 -1 -1 7
1 1 1 1 4
1 1 1 1 5
Do you think the design matrix is right or not? Now I want to build a contrast to look at the interaction between subtype and YMRS scores, how should I build it? And also an other question, does the sample size need to be equivalent between the two subgroups and also the number of sample size should not be odd numbers?
Many thanks,
Hua
I have a question about the design matrix and contrast about the interactions between bipolar disorder subtypes and YMRS/HAMD scores in NBS. I have for example 6 manic patients and 4 depressive patients, and I also have the YMRS scores for each patient. I build my design matrix like the following,
1 -1 -1 1 19
1 -1 -1 1 21
1 -1 -1 1 22
1 -1 1 -1 32
1 -1 1 -1 22
1 -1 1 -1 21
1 1 -1 -1 6
1 1 -1 -1 7
1 1 1 1 4
1 1 1 1 5
Do you think the design matrix is right or not? Now I want to build a contrast to look at the interaction between subtype and YMRS scores, how should I build it? And also an other question, does the sample size need to be equivalent between the two subgroups and also the number of sample size should not be odd numbers?
Many thanks,
Hua
Sep 30, 2017 07:09 PM | Hua Yu
RE: ANCOVA interaction effect
Dear Andrew,
Thanks for your kind reply. According to your suggestion, I modify my design matrix. The first column is a column of 1's to model the intercept, the second column is of 6 1's and 4 -1's to model 6 manic and 4 depressive patients. The third column is for the YMRS score, and the fourth column is for the interaction of BD subtypes and manic symptoms. The design matrix is as follows:
1 -1 19 1
1 -1 21 1
1 -1 22 1
1 -1 32 -1
1 -1 22 -1
1 -1 21 -1
1 1 6 -1
1 1 7 -1
1 1 4 1
1 1 5 1
And the t contrast is [ 0 0 0 1] or [0 0 0 -1].
Actually we have 30 manic patines and 20 depressive patients, for simplifying my design matrix, I just set the total sample size at 10 here.
Do you think the design matrix is right this time?
Thanks again,
Hua
Thanks for your kind reply. According to your suggestion, I modify my design matrix. The first column is a column of 1's to model the intercept, the second column is of 6 1's and 4 -1's to model 6 manic and 4 depressive patients. The third column is for the YMRS score, and the fourth column is for the interaction of BD subtypes and manic symptoms. The design matrix is as follows:
1 -1 19 1
1 -1 21 1
1 -1 22 1
1 -1 32 -1
1 -1 22 -1
1 -1 21 -1
1 1 6 -1
1 1 7 -1
1 1 4 1
1 1 5 1
And the t contrast is [ 0 0 0 1] or [0 0 0 -1].
Actually we have 30 manic patines and 20 depressive patients, for simplifying my design matrix, I just set the total sample size at 10 here.
Do you think the design matrix is right this time?
Thanks again,
Hua
Sep 30, 2017 10:09 PM | Andrew Zalesky
RE: ANCOVA interaction effect
My understanding was that you are
interested in the interaction between column 2 and column 3.
However, column 4 does not model this interaction. You should
include columns for the main effects corresponding to the
interaction - i.e. BD subtypes and manic symptoms.Currently, the
two main effects (column 2 and 3) don't seem to relate to the
interaction (column 4).
Andrew
Originally posted by Hua Yu:
Andrew
Originally posted by Hua Yu:
Dear Andrew,
Thanks for your kind reply. According to your suggestion, I modify my design matrix. The first column is a column of 1's to model the intercept, the second column is of 6 1's and 4 -1's to model 6 manic and 4 depressive patients. The third column is for the YMRS score, and the fourth column is for the interaction of BD subtypes and manic symptoms. The design matrix is as follows:
1 -1 19 1
1 -1 21 1
1 -1 22 1
1 -1 32 -1
1 -1 22 -1
1 -1 21 -1
1 1 6 -1
1 1 7 -1
1 1 4 1
1 1 5 1
And the t contrast is [ 0 0 0 1] or [0 0 0 -1].
Actually we have 30 manic patines and 20 depressive patients, for simplifying my design matrix, I just set the total sample size at 10 here.
Do you think the design matrix is right this time?
Thanks again,
Hua
Thanks for your kind reply. According to your suggestion, I modify my design matrix. The first column is a column of 1's to model the intercept, the second column is of 6 1's and 4 -1's to model 6 manic and 4 depressive patients. The third column is for the YMRS score, and the fourth column is for the interaction of BD subtypes and manic symptoms. The design matrix is as follows:
1 -1 19 1
1 -1 21 1
1 -1 22 1
1 -1 32 -1
1 -1 22 -1
1 -1 21 -1
1 1 6 -1
1 1 7 -1
1 1 4 1
1 1 5 1
And the t contrast is [ 0 0 0 1] or [0 0 0 -1].
Actually we have 30 manic patines and 20 depressive patients, for simplifying my design matrix, I just set the total sample size at 10 here.
Do you think the design matrix is right this time?
Thanks again,
Hua