help > Performing gPPI on a subset of sessions/runs
Showing 1-3 of 3 posts
May 15, 2014 10:05 PM | Christian Utzerath
Performing gPPI on a subset of sessions/runs
Dear Dr. McLaren,
First, I'd like you to thank you for your continued support of the gPPI toolbox. Since you last helped us out we have made substantial progress towards answering our research questions. My current question is whether is it possible to have gPPI only perform a PPI on specific runs. If so, how?
Our experiment is split into several runs. While each of the runs features the same conditions ('A' or 'B'), participants perform different tasks in each run (task 1, task 2, task 3). We include all of these task (3 of each task) in one large SPM.mat design, organized by task (1 1 1, 2 2 2, 3 3 3). A and B are the first two regressors within each run.
We have run gPPI over the entire design, so looking at A vs. B over all tasks. Our current goal is to estimate A vs. B during each task instead of collapsing across them. In the SPM GLM, we would then simply create a contrast vector that has non-zero values over one task at a time, thus modeling the contrast for three runs at a time while skipping all the others.
The help text of the gPPI function 'createVec.m' suggests that this can also be done in gPPI. Specifically, it states that the 'left cell string' (in P.Contrasts(n).left field) can be defined as vector if the contrast is known. Then 'right cell string' is supposed to be left empty in that case.
However, our attempts to define this vector manually have not been successful. We first simply defined a contrast vector over the entire design, with 0's for nuisance regressors and the other tasks that we to skip. After this didn't work, we added placeholder zeros for the three PPI regressors that gPPI adds, since we noted that without this, our vector was shorter than the number of betas in the design (SPM.mat Vbeta field). Again, the analysis aborts when SPM enters the contrast manager. While SPM.mat seems mostly complete, SPM.xCon remains empty.
We also tried isolating specific sessions by trying looking for our conditions only with the prefixes of these sessions*, but that led to the estimation of all 9 sessions again. Can you tell us how to perform a gPPI on specific (or isolated) sessions?
All the best,
Chris
* Specifically, we entered
P.Contrasts(n).left = {'A'};
P.Contrasts(n).right = {'B'};
Prefix.Left = {'Sn(1)', 'Sn(2)', 'Sn(3)'};
Prefix.Right = {'Sn(1)', 'Sn(2)', 'Sn(3)'};
First, I'd like you to thank you for your continued support of the gPPI toolbox. Since you last helped us out we have made substantial progress towards answering our research questions. My current question is whether is it possible to have gPPI only perform a PPI on specific runs. If so, how?
Our experiment is split into several runs. While each of the runs features the same conditions ('A' or 'B'), participants perform different tasks in each run (task 1, task 2, task 3). We include all of these task (3 of each task) in one large SPM.mat design, organized by task (1 1 1, 2 2 2, 3 3 3). A and B are the first two regressors within each run.
We have run gPPI over the entire design, so looking at A vs. B over all tasks. Our current goal is to estimate A vs. B during each task instead of collapsing across them. In the SPM GLM, we would then simply create a contrast vector that has non-zero values over one task at a time, thus modeling the contrast for three runs at a time while skipping all the others.
The help text of the gPPI function 'createVec.m' suggests that this can also be done in gPPI. Specifically, it states that the 'left cell string' (in P.Contrasts(n).left field) can be defined as vector if the contrast is known. Then 'right cell string' is supposed to be left empty in that case.
However, our attempts to define this vector manually have not been successful. We first simply defined a contrast vector over the entire design, with 0's for nuisance regressors and the other tasks that we to skip. After this didn't work, we added placeholder zeros for the three PPI regressors that gPPI adds, since we noted that without this, our vector was shorter than the number of betas in the design (SPM.mat Vbeta field). Again, the analysis aborts when SPM enters the contrast manager. While SPM.mat seems mostly complete, SPM.xCon remains empty.
We also tried isolating specific sessions by trying looking for our conditions only with the prefixes of these sessions*, but that led to the estimation of all 9 sessions again. Can you tell us how to perform a gPPI on specific (or isolated) sessions?
All the best,
Chris
* Specifically, we entered
P.Contrasts(n).left = {'A'};
P.Contrasts(n).right = {'B'};
Prefix.Left = {'Sn(1)', 'Sn(2)', 'Sn(3)'};
Prefix.Right = {'Sn(1)', 'Sn(2)', 'Sn(3)'};
May 16, 2014 03:05 PM | Donald McLaren
RE: Performing gPPI on a subset of sessions/runs
It is not currently possible to estimate specific runs. However,
you can form contrasts that are run specific. This will give you
the same contrast values, but the t-statistics will be different.
Since you only use the con_ maps at the group level, this is not an
issue.
In your specific cases, there are two options:
(1) Label each task/condition separately. This will lead to 6 task/conditions in your experiment. Then when you set up gPPI, the Task field would start with '0' then the list of 6 tasks. *Note: if you have more conditions, please list all of them.
(2) Form run specific contrasts as you have done.
You are right that can you enter a contrast vector. If the vector is not formatted correctly, then the program will not run. Defining contrasts manually is not recommended as most contrasts can be specified in other ways that will generate the correct contrasts.
In the session specific contrasts, can you check the contrast vector to see if the contrast is all 0s after the first 3 runs? This would tell you that the contrast has isolated the first three runs.
Let me know if you need more help.
-Donald
In your specific cases, there are two options:
(1) Label each task/condition separately. This will lead to 6 task/conditions in your experiment. Then when you set up gPPI, the Task field would start with '0' then the list of 6 tasks. *Note: if you have more conditions, please list all of them.
(2) Form run specific contrasts as you have done.
You are right that can you enter a contrast vector. If the vector is not formatted correctly, then the program will not run. Defining contrasts manually is not recommended as most contrasts can be specified in other ways that will generate the correct contrasts.
In the session specific contrasts, can you check the contrast vector to see if the contrast is all 0s after the first 3 runs? This would tell you that the contrast has isolated the first three runs.
Let me know if you need more help.
-Donald
May 29, 2014 05:05 PM | Christian Utzerath
RE: Performing gPPI on a subset of sessions/runs
Thank you for the information. It is indeed tricky to adress
specific conditions.
I solved the problem by modifying one of the PPPI scripts to accept custom vectors. In the file spm_contrasts_PPI.m, I expanded the 'Compute contrasts' section of the script to accept a user-generated input for the variables xCon and SPM.xCon. This way, sessions can be 'ignored'. However, one should remember that the contrast weights within the vector are usually scaled by the number of sessions (i.e., the weights for an experiment with 9 sessions will be 1/9=0.1111), so that scaling should also be applied onto the user-generated vectors.
Thank you very much!
I solved the problem by modifying one of the PPPI scripts to accept custom vectors. In the file spm_contrasts_PPI.m, I expanded the 'Compute contrasts' section of the script to accept a user-generated input for the variables xCon and SPM.xCon. This way, sessions can be 'ignored'. However, one should remember that the contrast weights within the vector are usually scaled by the number of sessions (i.e., the weights for an experiment with 9 sessions will be 1/9=0.1111), so that scaling should also be applied onto the user-generated vectors.
Thank you very much!
