help > Design matrix and contrast
Showing 1-2 of 2 posts
Display:
Results per page:
Jul 26, 2018  09:07 PM | Ana Maria Triana Hoyos - aalto univerisity
Design matrix and contrast
Hello Andrew,

I am running an analysis on 66 subjects whose data are collected from 4 different scanning sites. I am including the four scanning places as nuisance factors, as well as the mean framewise displacement. The subjects are divided in only two groups.
I have organized the design matrix as: [site1 site2 site3 site4 MFD 1 group1 group2], where '1' is constant for all subjects. 

I wanted to confirm I am understanding the contrast right. If I have no assumptions about the data, my contrast should be [0,0,0,0,0,0,1,1] and the type of test should be F-test. However, if I want to make some assumptions (e.g. grounp1>group2), my contrast should be [0,0,0,0,0,0,1,-1] and the type should be t-test. So, by marking the 0s I am indicating the first 6 values of each row are nuisance factors that should be regressed out of the data and the last two values are the groups.

Could you provide some help on if I am doing this correctly? 

Thank you in advance.

Best Regards,

-Ana
Jul 26, 2018  10:07 PM | Andrew Zalesky
RE: Design matrix and contrast
Hi Ana,

your explanation is correct.

However, your design matrix will be rank deficient and will not work.

First, you need to remove the "1" constant for all subjects because you are modeling each site. If you remove the sites, then you can add the 1 constant.

Second, rather than including group1 and group2, just include one group regressor that contains 1's and 0's.

So your design matrix would look like:

[site1 site2 site3 site4 MFD group]

F-test: [ 0 0 0 0 0 1]

t-test: [ 0 0 0 0 0 1] or [0 0 0 0 0 -1]

Let me know if you have questions,
Andrew



Originally posted by Ana Maria Triana Hoyos:
Hello Andrew,

I am running an analysis on 66 subjects whose data are collected from 4 different scanning sites. I am including the four scanning places as nuisance factors, as well as the mean framewise displacement. The subjects are divided in only two groups.
I have organized the design matrix as: [site1 site2 site3 site4 MFD 1 group1 group2], where '1' is constant for all subjects. 

I wanted to confirm I am understanding the contrast right. If I have no assumptions about the data, my contrast should be [0,0,0,0,0,0,1,1] and the type of test should be F-test. However, if I want to make some assumptions (e.g. grounp1>group2), my contrast should be [0,0,0,0,0,0,1,-1] and the type should be t-test. So, by marking the 0s I am indicating the first 6 values of each row are nuisance factors that should be regressed out of the data and the last two values are the groups.

Could you provide some help on if I am doing this correctly? 

Thank you in advance.

Best Regards,

-Ana