help > design matrix
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

Threaded View

TitleAuthorDate
design matrix
Takuya Ishida Oct 1, 2021
Andrew Zalesky Oct 1, 2021
Takuya Ishida Oct 2, 2021