Hi,
I started to use generalized PPI (gPPI) and think I found a bug... I would like to make sure if it is a true bug or I did something wrong.
In my experiment, I have 2 conditions or 'tasks' (A and B, which are two different types of stimuli onsets) of interest and each condition has its own parametric modulator (A_para and B_para). This is how I set up my gPPI script.
P = [];
P.subject= 'SUBJECT_ID';
P.directory = SPM_PATH;
P.VOI= roiFile.nii
P.Region = ROI_name;
P.Estimate=1;
P.contrast=0;
P.extract='eig';
P.Tasks = {'1' 'A' 'B'}; % condition (or task..)
P.Weights=[];
P.analysis='psy';
P.method='cond';
P.outdir = outputPath;
P.CompContrasts= 0;
P.Weighted = 0;
...
When I ran this code (with more script lines that are not posted here) in my linux machine, I got an error message that 'Program will now exit. You specified too many tasks.'. There are other conditions (outcome onsets, ignored responses, etc.), so this error message can't be true. Also,if I run this code in a Mac computer, I don't get this message!
So, I tried to find out why... and this is what I found.
It turns out that 'PPPIinputsvalid.m' line 167 generated the error message.
--------------------------------------------------------------------------------------
if length(P.Tasks) > str2double(max(SPM.xsDes.Trials_per_session))
I changed this line to the following --> if length(P.Tasks) > max(SPM.xsDes.Trials_per_session)
--------------------------------------------------------------------------------------
After making the change, I can run the gPPI without a problem. Is everything fine with this??
If I can ask another question, how can I generate a gPPI contrast for a parametric regressor? I want to put '1' for the PPI interaction column between the seed time-series and parametric regressor, and '0' for everything else. I initially set P.Contrasts like this, but this didn't work. I also put parametric regressor name instead of the task name (e.g., 'A'), but it didn't work, either. It just didn't generate any contrasts. So, I just used SPM8 batch script to add the contrasts, but am just curious if gPPI can take care of it, too.
P.Contrasts(1).left = {'A'};
P.Contrasts(1).right = {};
P.Contrasts(1).STAT = 'T';
P.Contrasts(1).Weighted = 0;
P.Contrasts(1).MinEvents = 10;
P.Contrasts(1).name = 'gPPI_A';
P.Contrasts(2).left = {'B'};
P.Contrasts(2).right = {};
P.Contrasts(2).STAT = 'T';
P.Contrasts(2).Weighted = 0;
P.Contrasts(2).MinEvents = 10;
P.Contrasts(2).name = 'gPPI_B';
Thanks,
CS
|