help > Excluding Subjects
Showing 1-10 of 10 posts
Display:
Results per page:
Jun 23, 2014  08:06 PM | Harriet Johnston
Excluding Subjects
Hello,
I'm wondering if there is a way to exclude particular subjects from 2nd level analysis (if they've already been  included in first level analysis) - I see I can delete subjects - but the problem with that is that all the subject numbers after the deleted subject are changed and I don't want that - there a few subjects I'd like to exclude having gained a bit more knowledge of problems within their data...without having to start a whole new project as I don't have the time to start the analysis from scratch.
Any efficient suggestions welcome :)
Thanks
Harriet
Jun 23, 2014  08:06 PM | Alfonso Nieto-Castanon - Boston University
RE: Excluding Subjects
Hi Harriet,

Yes, there are a couple of ways to do this:

1) create new second-level covariates that have the same values as your original ones except that they have zeros for the subjects that you want to exclude, then simply use these new covariates in your second-level analyses. By default CONN will exclude from a second-level analysis any subject where *all* of the selected between-subject effects are zero (this is the same strategy used, for example, when you want to perform within-group second-level analyses)

or 2) create a new second-level covariate for each subject you want to exclude (dummy coded, 1 for the excluded subject and 0 for everyone else; one covariate for each excluded subject - not all excluded subjects in a single covariate). Then simply include these new covariates in any analysis where you want to exclude some subjects).

Both approaches are exactly equivalent, and they will produce the exact same results.  For "sanity-checking" look at the degrees of freedom of the results, they should always be equal to the number of subjects included in your analyses minus the number of between-subject effects included in the analyses.

Hope this helps
Alfonso


Originally posted by Harriet Johnston:
Hello,
I'm wondering if there is a way to exclude particular subjects from 2nd level analysis (if they've already been  included in first level analysis) - I see I can delete subjects - but the problem with that is that all the subject numbers after the deleted subject are changed and I don't want that - there a few subjects I'd like to exclude having gained a bit more knowledge of problems within their data...without having to start a whole new project as I don't have the time to start the analysis from scratch.
Any efficient suggestions welcome :)
Thanks
Harriet
Jun 23, 2014  08:06 PM | Harriet Johnston
RE: Excluding Subjects
Thanks so much Alfonso - for a quick and very helpful response. This is great.
Sep 20, 2022  01:09 PM | Chihhao Lien
RE: Excluding Subjects
Dear experts,

Thanks for your discussion.
For the way 1), I'm wondering whether I understand your discussion correctly.

If I have 6 subjects (including 3 healthy controls and 3 patients) and several covariates (e.g. age and gender), I have the following 2nd-level covariates:

HC: [1 1 1 0 0 0]
Patient: [0 0 0 1 1 1]
Age: [22 23 24 21 24 25] (after orthogonalizing to all subjects, it's [-1.167 -0.167 0.833 -2.167 0.833 1.833])
Gender: [1 0 1 0 1 1] (1 for male and 0 for female)


Then, I want to remove one patient (the last patient) from the analysis, so I add new covariates.

HC_new: [1 1 1 0 0 0]
Patient_new: [0 0 0 1 1 0]
Age_new: [22 23 24 21 24 0] (after orthogonalizing to all remained subjects, it's [-0.8 0.2 1.2 -1.8 1.2 0])
Gender: [1 0 1 0 1 0]

For comparing differences between HC and Patients after controlling for the effect of age and gender, I select these 4 new covariates and input [-1 1 0 0] as the vector for between-subject contrast.

Is the result as the same if I create a new project only including the first 5 subjects?

Thanks.

Best,
Chih-Hao Lien
Sep 26, 2022  10:09 PM | Alfonso Nieto-Castanon - Boston University
RE: Excluding Subjects
Dear Chih-Hao Lien
Yes, you are interpreting correctly and the results will be exactly the same (that subjects' data is never entered into your second-level analysis)
Best
Alfonso
Originally posted by Chihhao Lien:
Dear experts,

Thanks for your discussion.
For the way 1), I'm wondering whether I understand your discussion correctly.

If I have 6 subjects (including 3 healthy controls and 3 patients) and several covariates (e.g. age and gender), I have the following 2nd-level covariates:

HC: [1 1 1 0 0 0]
Patient: [0 0 0 1 1 1]
Age: [22 23 24 21 24 25] (after orthogonalizing to all subjects, it's [-1.167 -0.167 0.833 -2.167 0.833 1.833])
Gender: [1 0 1 0 1 1] (1 for male and 0 for female)


Then, I want to remove one patient (the last patient) from the analysis, so I add new covariates.

HC_new: [1 1 1 0 0 0]
Patient_new: [0 0 0 1 1 0]
Age_new: [22 23 24 21 24 0] (after orthogonalizing to all remained subjects, it's [-0.8 0.2 1.2 -1.8 1.2 0])
Gender: [1 0 1 0 1 0]

For comparing differences between HC and Patients after controlling for the effect of age and gender, I select these 4 new covariates and input [-1 1 0 0] as the vector for between-subject contrast.

Is the result as the same if I create a new project only including the first 5 subjects?

Thanks.

Best,
Chih-Hao Lien
Sep 27, 2022  09:09 AM | Chihhao Lien
RE: Excluding Subjects
Dear Alfonso,

Thanks for your reply!

Best,
Chih-Hao Lien
Mar 13, 2023  07:03 AM | Yoshiko Yabe
RE: Excluding Subjects
Dear Exparts,

Thank you for the informative discussion here.

I have a set of preprocessed data from multiple groups but I am interested in only the correlation between the FCs and the task perormance obtained from the group Disease1. The data from Disease2 is taken for a different study.

HC: [1 1 0 0 0 0]
Disease1: [0 0 1 1 0 0]
Disease2: [0 0 0 0 1 1]
Age: [22 23 24 21 24 25]
Gender: [1 0 1 0 1 1]
Task: [2 1 3 5 2 9]

The covariates of Disease1*Age, Disease1*Gender, and Disease1*Task were created on the SETUP>Covariates (2nd level) tab.

Should I test the between-subjects model 'y~Disease1*Age+ Disease1*Gender + Disease1*Task (0 0 1)' 
or another model 'y~Disease1 + Disease1*Age+ Disease1*Gender + Disease1*Task (0 0 1)'?

Thank you very much.

Best wishes,
Yoshiko


Originally posted by Chihhao Lien:
Dear experts,

Thanks for your discussion.
For the way 1), I'm wondering whether I understand your discussion correctly.

If I have 6 subjects (including 3 healthy controls and 3 patients) and several covariates (e.g. age and gender), I have the following 2nd-level covariates:

HC: [1 1 1 0 0 0]
Patient: [0 0 0 1 1 1]
Age: [22 23 24 21 24 25] (after orthogonalizing to all subjects, it's [-1.167 -0.167 0.833 -2.167 0.833 1.833])
Gender: [1 0 1 0 1 1] (1 for male and 0 for female)


Then, I want to remove one patient (the last patient) from the analysis, so I add new covariates.

HC_new: [1 1 1 0 0 0]
Patient_new: [0 0 0 1 1 0]
Age_new: [22 23 24 21 24 0] (after orthogonalizing to all remained subjects, it's [-0.8 0.2 1.2 -1.8 1.2 0])
Gender: [1 0 1 0 1 0]

For comparing differences between HC and Patients after controlling for the effect of age and gender, I select these 4 new covariates and input [-1 1 0 0] as the vector for between-subject contrast.

Is the result as the same if I create a new project only including the first 5 subjects?

Thanks.

Best,
Chih-Hao Lien
Mar 15, 2023  10:03 PM | Alfonso Nieto-Castanon - Boston University
RE: Excluding Subjects
Dear Yoshiko,

The latter, you would define a model of the form 

y~Disease1 + Disease1*Age+ Disease1*Gender + Disease1*Task (0 0 0 1)

to evaluate the association between Task and connectivity across subjects within the Disease1 group only (and while controlling for age and gender covariates within the same group). The first 'disease1' term in the above model corresponds to the constant term of your regression analyses, i.e. the model is equivalent to:

y ~ Disease1 * (1 + Age+ Gender + Task)

Best
Alfonso 
Originally posted by Yoshiko Yabe:
Dear Exparts,

Thank you for the informative discussion here.

I have a set of preprocessed data from multiple groups but I am interested in only the correlation between the FCs and the task perormance obtained from the group Disease1. The data from Disease2 is taken for a different study.

HC: [1 1 0 0 0 0]
Disease1: [0 0 1 1 0 0]
Disease2: [0 0 0 0 1 1]
Age: [22 23 24 21 24 25]
Gender: [1 0 1 0 1 1]
Task: [2 1 3 5 2 9]

The covariates of Disease1*Age, Disease1*Gender, and Disease1*Task were created on the SETUP>Covariates (2nd level) tab.

Should I test the between-subjects model 'y~Disease1*Age+ Disease1*Gender + Disease1*Task (0 0 1)' 
or another model 'y~Disease1 + Disease1*Age+ Disease1*Gender + Disease1*Task (0 0 1)'?

Thank you very much.

Best wishes,
Yoshiko


Originally posted by Chihhao Lien:
Dear experts,

Thanks for your discussion.
For the way 1), I'm wondering whether I understand your discussion correctly.

If I have 6 subjects (including 3 healthy controls and 3 patients) and several covariates (e.g. age and gender), I have the following 2nd-level covariates:

HC: [1 1 1 0 0 0]
Patient: [0 0 0 1 1 1]
Age: [22 23 24 21 24 25] (after orthogonalizing to all subjects, it's [-1.167 -0.167 0.833 -2.167 0.833 1.833])
Gender: [1 0 1 0 1 1] (1 for male and 0 for female)


Then, I want to remove one patient (the last patient) from the analysis, so I add new covariates.

HC_new: [1 1 1 0 0 0]
Patient_new: [0 0 0 1 1 0]
Age_new: [22 23 24 21 24 0] (after orthogonalizing to all remained subjects, it's [-0.8 0.2 1.2 -1.8 1.2 0])
Gender: [1 0 1 0 1 0]

For comparing differences between HC and Patients after controlling for the effect of age and gender, I select these 4 new covariates and input [-1 1 0 0] as the vector for between-subject contrast.

Is the result as the same if I create a new project only including the first 5 subjects?

Thanks.

Best,
Chih-Hao Lien
Dec 29, 2023  07:12 PM | Reza Momenan - CNIRC, NIAAA, NIH
RE: Excluding Subjects

Dear Alfonso,


 


How would the set up change if we want to see the difference in effect of task between disease1 and disease2?


Thank you.


Originally posted by Alfonso Nieto-Castanon:


Dear Yoshiko, The latter, you would define a model of the form  y~Disease1 + Disease1*Age+ Disease1*Gender + Disease1*Task (0 0 0 1) to evaluate the association between Task and connectivity across subjects within the Disease1 group only (and while controlling for age and gender covariates within the same group). The first 'disease1' term in the above model corresponds to the constant term of your regression analyses, i.e. the model is equivalent to: y ~ Disease1 * (1 + Age+ Gender + Task) Best Alfonso  Originally posted by Yoshiko Yabe:
Dear Exparts, Thank you for the informative discussion here. I have a set of preprocessed data from multiple groups but I am interested in only the correlation between the FCs and the task perormance obtained from the group Disease1. The data from Disease2 is taken for a different study. HC: [1 1 0 0 0 0] Disease1: [0 0 1 1 0 0] Disease2: [0 0 0 0 1 1] Age: [22 23 24 21 24 25] Gender: [1 0 1 0 1 1] Task: [2 1 3 5 2 9] The covariates of Disease1*Age, Disease1*Gender, and Disease1*Task were created on the SETUP>Covariates (2nd level) tab. Should I test the between-subjects model 'y~Disease1*Age+ Disease1*Gender + Disease1*Task (0 0 1)'  or another model 'y~Disease1 + Disease1*Age+ Disease1*Gender + Disease1*Task (0 0 1)'? Thank you very much. Best wishes, Yoshiko Originally posted by Chihhao Lien:
Dear experts,
Thanks for your discussion. For the way 1), I'm wondering whether I understand your discussion correctly. If I have 6 subjects (including 3 healthy controls and 3 patients) and several covariates (e.g. age and gender), I have the following 2nd-level covariates: HC: [1 1 1 0 0 0] Patient: [0 0 0 1 1 1] Age: [22 23 24 21 24 25] (after orthogonalizing to all subjects, it's [-1.167 -0.167 0.833 -2.167 0.833 1.833]) Gender: [1 0 1 0 1 1] (1 for male and 0 for female) Then, I want to remove one patient (the last patient) from the analysis, so I add new covariates. HC_new: [1 1 1 0 0 0] Patient_new: [0 0 0 1 1 0] Age_new: [22 23 24 21 24 0] (after orthogonalizing to all remained subjects, it's [-0.8 0.2 1.2 -1.8 1.2 0]) Gender: [1 0 1 0 1 0] For comparing differences between HC and Patients after controlling for the effect of age and gender, I select these 4 new covariates and input [-1 1 0 0] as the vector for between-subject contrast. Is the result as the same if I create a new project only including the first 5 subjects? Thanks. Best, Chih-Hao Lien

 

Dec 29, 2023  11:12 PM | Reza Momenan - CNIRC, NIAAA, NIH
RE: Excluding Subjects

Dear Alfonso,


Two questions:


1) by Disease1*Age, Disease1*Gender, Disease1*Task, do you mean generating the interaction term for Disease 1 and Age, etc?


2) How do we set the same up for seeing the differnce in effect of Task on Disease1 and Disease2?


Thank you.