help > Parametric Modulation - All Same Results?
Showing 1-3 of 3 posts
Display:
Results per page:
Dec 17, 2016  05:12 PM | Elisa Baek
Parametric Modulation - All Same Results?
Hello!

I used gPPI to run a few models with a parametric modulator, as defined by 'Contrail'. I ran the models with over 5 different seed regions that do not anatomically overlap, but the results that I get from all the seed regions are remarkably similar (~95% overlap). Is this typical? I've checked numerous times to make sure it's not actually pulling from the same seed region every time.

Thank you!
Jan 6, 2017  04:01 PM | Elisa Baek
RE: Parametric Modulation - All Same Results?
Here is the PPPI wrapper code I am using, if that helps identify where I am going wrong. Thank you!

clear all; home;
% -----------Paths-----------
gPPIpath = '/gPPI_PATH';
studypath = '/Study_PATH';
maskpath = '/ROI_PATH';
level1path = '/level1_PATH';

% -----------Patterns for finding files and folders -----------
subjectpattern = 'SUBJ*';
subTAG = [ 1 2 3 4 5 6 8 9 10 11 12 13 14 15 16 17 18 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 ]
maskpattern = '*.nii';
% -----------General PPI analysis parameters-----------
spmversion = 8;
estimateTAG = 1;
ppi_folder_affix = 'PPI_model_';
% -----------Defining the conditions  (psychological effects)-----------
method = 'cond';
conditions = { 'review' };
weights = [];
% -----------Definining the seed timecourse (physiological effect)-----------
fcontrast = 1;
extract='eig';
masks={'mask.img'};
threshold = .5;
VOImin = 10;
%-----------Contrasts-----------
convec = [];
%---------------------------------------------------------------------%
addpath(gPPIpath)
% Find subjects
%---------------------------------------------------------------------%
cd(studypath);
fprintf('\nSUBJECT LIST:\n');
d=dir(subjectpattern);
for i=1:length(d)
subnam{i}=d(i).name;
subdir{i} = [studypath '/' subnam{i}];
fprintf('\tAdding %s to subject list\n',subnam{i})
end
nsubs = length(subnam);
if strcmp(subTAG,'all')
dosubs = 1:nsubs;
else
dosubs = subTAG;
end
% Find mask files
%---------------------------------------------------------------------%
cd(maskpath)
fprintf('\n\nMASK LIST:\n');
d=dir(maskpattern);
for i=1:length(d)
voiNAMES{i}=d(i).name;
voi_anal_names{i} = voiNAMES{i}(1:end-4);
fprintf('\tAdding %s to mask list\n',voiNAMES{i})
end
nmasks = length(voiNAMES);
domasks = 1:nmasks;
%---------------------------------------------------------------------%
%---------------------------------------------------------------------%
% Begin looping through regions and subjects
%---------------------------------------------------------------------%
for v=domasks
for i=dosubs
try
cd(gPPIpath)
load('parameters.mat')
P.subject=subnam{i};
P.VOI.VOI = [maskpath filesep voiNAMES{v}];
P.VOI.masks = masks;
P.VOI.thresh = threshold;
P.VOI.min = VOImin;
P.VOImin = VOImin;
P.Region = [voi_anal_names{v} '_' ppi_folder_affix];
P.SPMver = spmversion;
P.directory=[subdir{i} filesep level1path];
P.method = method;
P.Estimate = estimateTAG;
P.contrast = fcontrast;
P.extract = extract;
if strcmp(method,'trad')
P.Tasks = conditions;
P.Weights = weights;
P.Contrasts(1).name = 'PPI';
P.Contrasts(1).left = convec;
P.Contrasts(1).right = [];
else
P.Tasks = ['0' conditions];
end
if strcmp(method,'cond')
% USER INPUT: Specify your contrasts of interest
%--------------------------------------------------------------%
P.Contrasts(1).name = 'review_vs_rest';
P.Contrasts(1).left = {'review'};
P.Contrasts(1).right = {'none'};
P.Contrasts(2) = P.Contrasts(1);
P.Contrasts(2).name = 'reviewxpmod';
P.Contrasts(2).left = {'review'};
P.Contrasts(2).right = {'none'};
P.Contrasts(2).Contrail = {'xpmod^1'};
spmfile=[studypath, '/', subnam{i}, level1path,'SPM.mat']
load(spmfile)
%--------------------------------------------------------------%
end
% now run!
PPPI(P);
catch err
rethrow(err)
disp(['Failed: ' subnam{i}])
end
clear P
end
end
Jan 6, 2017  09:01 PM | Donald McLaren
RE: Parametric Modulation - All Same Results?
What is the result of:

SPM.xX.name' for the SPM.mat for gPPI. If there are no columns with 'xpmod^1' in them, then the contrast can't be created.
Originally posted by Elisa Baek:
Here is the PPPI wrapper code I am using, if that helps identify where I am going wrong. Thank you!

clear all; home;
% -----------Paths-----------
gPPIpath = '/gPPI_PATH';
studypath = '/Study_PATH';
maskpath = '/ROI_PATH';
level1path = '/level1_PATH';

% -----------Patterns for finding files and folders -----------
subjectpattern = 'SUBJ*';
subTAG = [ 1 2 3 4 5 6 8 9 10 11 12 13 14 15 16 17 18 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 ]
maskpattern = '*.nii';
% -----------General PPI analysis parameters-----------
spmversion = 8;
estimateTAG = 1;
ppi_folder_affix = 'PPI_model_';
% -----------Defining the conditions  (psychological effects)-----------
method = 'cond';
conditions = { 'review' };
weights = [];
% -----------Definining the seed timecourse (physiological effect)-----------
fcontrast = 1;
extract='eig';
masks={'mask.img'};
threshold = .5;
VOImin = 10;
%-----------Contrasts-----------
convec = [];
%---------------------------------------------------------------------%
addpath(gPPIpath)
% Find subjects
%---------------------------------------------------------------------%
cd(studypath);
fprintf('\nSUBJECT LIST:\n');
d=dir(subjectpattern);
for i=1:length(d)
subnam{i}=d(i).name;
subdir{i} = [studypath '/' subnam{i}];
fprintf('\tAdding %s to subject list\n',subnam{i})
end
nsubs = length(subnam);
if strcmp(subTAG,'all')
dosubs = 1:nsubs;
else
dosubs = subTAG;
end
% Find mask files
%---------------------------------------------------------------------%
cd(maskpath)
fprintf('\n\nMASK LIST:\n');
d=dir(maskpattern);
for i=1:length(d)
voiNAMES{i}=d(i).name;
voi_anal_names{i} = voiNAMES{i}(1:end-4);
fprintf('\tAdding %s to mask list\n',voiNAMES{i})
end
nmasks = length(voiNAMES);
domasks = 1:nmasks;
%---------------------------------------------------------------------%
%---------------------------------------------------------------------%
% Begin looping through regions and subjects
%---------------------------------------------------------------------%
for v=domasks
for i=dosubs
try
cd(gPPIpath)
load('parameters.mat')
P.subject=subnam{i};
P.VOI.VOI = [maskpath filesep voiNAMES{v}];
P.VOI.masks = masks;
P.VOI.thresh = threshold;
P.VOI.min = VOImin;
P.VOImin = VOImin;
P.Region = [voi_anal_names{v} '_' ppi_folder_affix];
P.SPMver = spmversion;
P.directory=[subdir{i} filesep level1path];
P.method = method;
P.Estimate = estimateTAG;
P.contrast = fcontrast;
P.extract = extract;
if strcmp(method,'trad')
P.Tasks = conditions;
P.Weights = weights;
P.Contrasts(1).name = 'PPI';
P.Contrasts(1).left = convec;
P.Contrasts(1).right = [];
else
P.Tasks = ['0' conditions];
end
if strcmp(method,'cond')
% USER INPUT: Specify your contrasts of interest
%--------------------------------------------------------------%
P.Contrasts(1).name = 'review_vs_rest';
P.Contrasts(1).left = {'review'};
P.Contrasts(1).right = {'none'};
P.Contrasts(2) = P.Contrasts(1);
P.Contrasts(2).name = 'reviewxpmod';
P.Contrasts(2).left = {'review'};
P.Contrasts(2).right = {'none'};
P.Contrasts(2).Contrail = {'xpmod^1'};
spmfile=[studypath, '/', subnam{i}, level1path,'SPM.mat']
load(spmfile)
%--------------------------------------------------------------%
end
% now run!
PPPI(P);
catch err
rethrow(err)
disp(['Failed: ' subnam{i}])
end
clear P
end
end