help > Using a parametric as "Task"?
Showing 1-8 of 8 posts
Jun 27, 2013 07:06 PM | Theresa Desrochers
Using a parametric as "Task"?
Hi,
I would like you use a parametric regressor as a "Task" in gPPI, but PPPI.m only searches the first item in the SPM.Sess.U.name structure (line 503). This is a problem because, as you know, any parametrics would be listed as subsequent names. Is there a way around this?
Also, a couple of other small things I found but have now found solutions/work arounds.
1. In your manual you refer to the P.Contrast field, and in your code it's P.contrast.
2. If I understood your manual/comments correctly, setting P.FLmask = 1 should mask the VOI with the mask.img that is in the first level directory -- is this correct? If so, I couldn't get that to work so instead used a struct for VOI listing the VOI .nii file and then the masks as the mask.img.
Thank you!
~Theresa
I would like you use a parametric regressor as a "Task" in gPPI, but PPPI.m only searches the first item in the SPM.Sess.U.name structure (line 503). This is a problem because, as you know, any parametrics would be listed as subsequent names. Is there a way around this?
Also, a couple of other small things I found but have now found solutions/work arounds.
1. In your manual you refer to the P.Contrast field, and in your code it's P.contrast.
2. If I understood your manual/comments correctly, setting P.FLmask = 1 should mask the VOI with the mask.img that is in the first level directory -- is this correct? If so, I couldn't get that to work so instead used a struct for VOI listing the VOI .nii file and then the masks as the mask.img.
Thank you!
~Theresa
Jun 27, 2013 08:06 PM | Donald McLaren
RE: Using a parametric as "Task"?
Theresa,
(1) You can't select only the parametric regressor as it wouldn't make any sense. In your task, you have the canonical HRF + parametric modulator that has a HRF with a variable amplitude for each trial. This generates the mean response, plus the slope of the parametric regressor. Likewise, in gPPI, you need the mean connectivity of each task and the connectivity change related to your parametric modulator. Thus, you want your task and the parametric modulator. To select both the task and the PM, simply list the task and it should select the PM as well as the task (see lines when it gets the task data, ~540). Hope this answers the question and is a suitable solution.
(2) Thanks for catching the typo, I'll fix it in the next release of the manual.
(3) Your understanding is correct. In your case, was the VOI falling outside of the first-level mask? If the VOI is inside the mask, you won't notice any effect. In general, I recommend using the group mask to threshold the VOI file that is generated. If you could send me the VOI that is outside the mask and the the first-level mask, I can look into this further.
(1) You can't select only the parametric regressor as it wouldn't make any sense. In your task, you have the canonical HRF + parametric modulator that has a HRF with a variable amplitude for each trial. This generates the mean response, plus the slope of the parametric regressor. Likewise, in gPPI, you need the mean connectivity of each task and the connectivity change related to your parametric modulator. Thus, you want your task and the parametric modulator. To select both the task and the PM, simply list the task and it should select the PM as well as the task (see lines when it gets the task data, ~540). Hope this answers the question and is a suitable solution.
(2) Thanks for catching the typo, I'll fix it in the next release of the manual.
(3) Your understanding is correct. In your case, was the VOI falling outside of the first-level mask? If the VOI is inside the mask, you won't notice any effect. In general, I recommend using the group mask to threshold the VOI file that is generated. If you could send me the VOI that is outside the mask and the the first-level mask, I can look into this further.
Jun 27, 2013 08:06 PM | Theresa Desrochers
RE: Using a parametric as "Task"?
Originally posted by Donald McLaren:
(2) Thanks for catching the typo, I'll fix it in the next release of the manual.
(3) Your understanding is correct. In your case, was the VOI falling outside of the first-level mask? If the VOI is inside the mask, you won't notice any effect. In general, I recommend using the group mask to threshold the VOI file that is generated. If you could send me the VOI that is outside the mask and the the first-level mask, I can look into this further.
Yes, I was getting the error "VOI is larger than dataset. Program will exit" (and I did verify that a corner of the VOI is outside the mask; it's the very front of the brain).
I'm attaching the VOI. I can't attach more than one so I'll reply again with the mask.
Theresa,
(1) You can't select only the parametric regressor as it wouldn't make any sense. In your task, you have the canonical HRF + parametric modulator that has a HRF with a variable amplitude for each trial. This generates the mean response, plus the slope of the parametric regressor. Likewise, in gPPI, you need the mean connectivity of each task and the connectivity change related to your parametric modulator. Thus, you want your task and the parametric modulator. To select both the task and the PM, simply list the task and it should select the PM as well as the task (see lines when it gets the task data, ~540). Hope this answers the question and is a suitable solution.
Yes. Gotcha. I guess I have to think a little more about exactly
what I am after, but I see and understand your point.(1) You can't select only the parametric regressor as it wouldn't make any sense. In your task, you have the canonical HRF + parametric modulator that has a HRF with a variable amplitude for each trial. This generates the mean response, plus the slope of the parametric regressor. Likewise, in gPPI, you need the mean connectivity of each task and the connectivity change related to your parametric modulator. Thus, you want your task and the parametric modulator. To select both the task and the PM, simply list the task and it should select the PM as well as the task (see lines when it gets the task data, ~540). Hope this answers the question and is a suitable solution.
(2) Thanks for catching the typo, I'll fix it in the next release of the manual.
(3) Your understanding is correct. In your case, was the VOI falling outside of the first-level mask? If the VOI is inside the mask, you won't notice any effect. In general, I recommend using the group mask to threshold the VOI file that is generated. If you could send me the VOI that is outside the mask and the the first-level mask, I can look into this further.
Yes, I was getting the error "VOI is larger than dataset. Program will exit" (and I did verify that a corner of the VOI is outside the mask; it's the very front of the brain).
I'm attaching the VOI. I can't attach more than one so I'll reply again with the mask.
Jun 28, 2013 03:06 PM | Donald McLaren
RE: Using a parametric as "Task"?
> Theresa, if you set P.equalroi=0, then does it work? From the
code, you
> need to specify that the ROIs can be unequal sizes for each subject -
> otherwise it won't use the first-level mask. I'll make this explanation
> clearer in the manual.
>
> need to specify that the ROIs can be unequal sizes for each subject -
> otherwise it won't use the first-level mask. I'll make this explanation
> clearer in the manual.
>
Jun 28, 2013 06:06 PM | Theresa Desrochers
RE: Using a parametric as "Task"?
Yes, that works. Everything is working great now (and the analysis
is running as we speak). Thanks for your help!
Dec 13, 2013 12:12 PM | Jan Engelmann
RE: Using a parametric as "Task"?
Dear gPPI Users,
I am running into the same problem that Theresa outlined - using a sphere that is outside the mask for very few subjects. I have followed Donald's instructions and set equalroi: 0, but the estimation stops anyway. I am not sure why this is happening and would love some advice. Here my P structure:
P =
subject: 'C09_20090402'
VOI: '/Volumes/.../AntInsula_-21_23_-8_mask.nii'
Region: 'AntInsula_-21_23_-8'
SPMver: 8
directory: '/Volumes/.../FLM_LinearPDerivatives_simple/'
Estimate: 1
contrast: {'Omnibus F-test for PPI Analyses'}
extract: 'mean'
Tasks: {'1' 'All'}
Weights: []
maskdir: []
equalroi: 0
FLmask: 0
VOI2: {}
analysis: 'psy'
method: 'cond'
CompContrasts: 1
Weighted: []
Contrasts: [1x2 struct]
Here the output:
Log File: C09_20090402_PPPI_12_13_2013_2.log
PPPI Version: 7.12.4-10-2013
Parameters used:
Processing subject: C09_20090402
VOI file : /Volumes/.../AntInsula_-21_23_-8_mask.nii
Output file will be: C09_20090402_AntInsula_-21_23_-8_session#_cond_PPI_regressors.txt
Contrast : Omnibus F-test for PPI Analyses
Analysis : Psychophysiological Interactions
Extraction : mean
Tasks : _1_All
Method : Condition Specific
VOI has 94762 voxels in 3x3x3 space
VOI has 33 voxels in 3x3x3 space. This is in the the same space as the input data and functional mask.
Failed: C09_20090402
I am running into the same problem that Theresa outlined - using a sphere that is outside the mask for very few subjects. I have followed Donald's instructions and set equalroi: 0, but the estimation stops anyway. I am not sure why this is happening and would love some advice. Here my P structure:
P =
subject: 'C09_20090402'
VOI: '/Volumes/.../AntInsula_-21_23_-8_mask.nii'
Region: 'AntInsula_-21_23_-8'
SPMver: 8
directory: '/Volumes/.../FLM_LinearPDerivatives_simple/'
Estimate: 1
contrast: {'Omnibus F-test for PPI Analyses'}
extract: 'mean'
Tasks: {'1' 'All'}
Weights: []
maskdir: []
equalroi: 0
FLmask: 0
VOI2: {}
analysis: 'psy'
method: 'cond'
CompContrasts: 1
Weighted: []
Contrasts: [1x2 struct]
Here the output:
Log File: C09_20090402_PPPI_12_13_2013_2.log
PPPI Version: 7.12.4-10-2013
Parameters used:
Processing subject: C09_20090402
VOI file : /Volumes/.../AntInsula_-21_23_-8_mask.nii
Output file will be: C09_20090402_AntInsula_-21_23_-8_session#_cond_PPI_regressors.txt
Contrast : Omnibus F-test for PPI Analyses
Analysis : Psychophysiological Interactions
Extraction : mean
Tasks : _1_All
Method : Condition Specific
VOI has 94762 voxels in 3x3x3 space
VOI has 33 voxels in 3x3x3 space. This is in the the same space as the input data and functional mask.
Failed: C09_20090402
Dec 16, 2013 04:12 PM | Donald McLaren
RE: Using a parametric as "Task"?
Jan,
The issue is one of two:
(1) The location of the files in SPM.mat no longer exists (e.g. SPM.xY.P
files were moved);
(2) The ROI is outside of the brain mask for this subject.
If #2 is the source of the error, you can either (a) mask the ROI by the
group mask; or (b) set P.FLmask to be equal to 1 instead of 0.
Hope this helps.
-Donald
The issue is one of two:
(1) The location of the files in SPM.mat no longer exists (e.g. SPM.xY.P
files were moved);
(2) The ROI is outside of the brain mask for this subject.
If #2 is the source of the error, you can either (a) mask the ROI by the
group mask; or (b) set P.FLmask to be equal to 1 instead of 0.
Hope this helps.
-Donald
