help > design matrix
Showing 1-3 of 3 posts
Oct 1, 2021 02:10 PM | Takuya Ishida - University of Bern
design matrix
Hi experts
I want to know how to make the design matrix in the following situation.
Assume that there are three groups, group A, group B and group C.
Then each group consists of 4,3,2 participants.
If we want to look at the pairwise group difference, is the following way of constructing the design matrix OK?
[ 1 0 0
1 0 0
1 0 0
1 0 0
0 1 0
0 1 0
0 1 0
0 0 1
0 0 1]
Then if you want to know the difference between group A and B,
you can make the contrast as follows. [1 -1 0]
Similarly, if you want to know the difference between B and C, you can make the contrast like [0 1 -1].
Finally, if you want to know the difference between C and A, you can make the contrast like [-1 0 1].
Any comment is appreciated.
Thank you
Takuya
I want to know how to make the design matrix in the following situation.
Assume that there are three groups, group A, group B and group C.
Then each group consists of 4,3,2 participants.
If we want to look at the pairwise group difference, is the following way of constructing the design matrix OK?
[ 1 0 0
1 0 0
1 0 0
1 0 0
0 1 0
0 1 0
0 1 0
0 0 1
0 0 1]
Then if you want to know the difference between group A and B,
you can make the contrast as follows. [1 -1 0]
Similarly, if you want to know the difference between B and C, you can make the contrast like [0 1 -1].
Finally, if you want to know the difference between C and A, you can make the contrast like [-1 0 1].
Any comment is appreciated.
Thank you
Takuya
Oct 1, 2021 11:10 PM | Andrew Zalesky
RE: design matrix
Hi Takuya,
yes - this looks correct. Note that the contrast [1 -1 0], will specifically test whether A is greater than B. You can then use [-1 1 0] to test B>A.
You can also do a single F-test using the contrast [1 1 1] to test whether any of the three group differ from each other.
Andrew
Originally posted by Takuya Ishida:
yes - this looks correct. Note that the contrast [1 -1 0], will specifically test whether A is greater than B. You can then use [-1 1 0] to test B>A.
You can also do a single F-test using the contrast [1 1 1] to test whether any of the three group differ from each other.
Andrew
Originally posted by Takuya Ishida:
Hi experts
I want to know how to make the design matrix in the following situation.
Assume that there are three groups, group A, group B and group C.
Then each group consists of 4,3,2 participants.
If we want to look at the pairwise group difference, is the following way of constructing the design matrix OK?
[ 1 0 0
1 0 0
1 0 0
1 0 0
0 1 0
0 1 0
0 1 0
0 0 1
0 0 1]
Then if you want to know the difference between group A and B,
you can make the contrast as follows. [1 -1 0]
Similarly, if you want to know the difference between B and C, you can make the contrast like [0 1 -1].
Finally, if you want to know the difference between C and A, you can make the contrast like [-1 0 1].
Any comment is appreciated.
Thank you
Takuya
I want to know how to make the design matrix in the following situation.
Assume that there are three groups, group A, group B and group C.
Then each group consists of 4,3,2 participants.
If we want to look at the pairwise group difference, is the following way of constructing the design matrix OK?
[ 1 0 0
1 0 0
1 0 0
1 0 0
0 1 0
0 1 0
0 1 0
0 0 1
0 0 1]
Then if you want to know the difference between group A and B,
you can make the contrast as follows. [1 -1 0]
Similarly, if you want to know the difference between B and C, you can make the contrast like [0 1 -1].
Finally, if you want to know the difference between C and A, you can make the contrast like [-1 0 1].
Any comment is appreciated.
Thank you
Takuya
Oct 2, 2021 08:10 PM | Takuya Ishida - University of Bern
RE: design matrix
Dear Andrew
Thank you very much for your reply.
It help me a lot.
Best
Takuya
Originally posted by Andrew Zalesky:
Thank you very much for your reply.
It help me a lot.
Best
Takuya
Originally posted by Andrew Zalesky:
Hi
Takuya,
yes - this looks correct. Note that the contrast [1 -1 0], will specifically test whether A is greater than B. You can then use [-1 1 0] to test B>A.
You can also do a single F-test using the contrast [1 1 1] to test whether any of the three group differ from each other.
Andrew
Originally posted by Takuya Ishida:
yes - this looks correct. Note that the contrast [1 -1 0], will specifically test whether A is greater than B. You can then use [-1 1 0] to test B>A.
You can also do a single F-test using the contrast [1 1 1] to test whether any of the three group differ from each other.
Andrew
Originally posted by Takuya Ishida:
Hi experts
I want to know how to make the design matrix in the following situation.
Assume that there are three groups, group A, group B and group C.
Then each group consists of 4,3,2 participants.
If we want to look at the pairwise group difference, is the following way of constructing the design matrix OK?
[ 1 0 0
1 0 0
1 0 0
1 0 0
0 1 0
0 1 0
0 1 0
0 0 1
0 0 1]
Then if you want to know the difference between group A and B,
you can make the contrast as follows. [1 -1 0]
Similarly, if you want to know the difference between B and C, you can make the contrast like [0 1 -1].
Finally, if you want to know the difference between C and A, you can make the contrast like [-1 0 1].
Any comment is appreciated.
Thank you
Takuya
I want to know how to make the design matrix in the following situation.
Assume that there are three groups, group A, group B and group C.
Then each group consists of 4,3,2 participants.
If we want to look at the pairwise group difference, is the following way of constructing the design matrix OK?
[ 1 0 0
1 0 0
1 0 0
1 0 0
0 1 0
0 1 0
0 1 0
0 0 1
0 0 1]
Then if you want to know the difference between group A and B,
you can make the contrast as follows. [1 -1 0]
Similarly, if you want to know the difference between B and C, you can make the contrast like [0 1 -1].
Finally, if you want to know the difference between C and A, you can make the contrast like [-1 0 1].
Any comment is appreciated.
Thank you
Takuya