JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for SPM Archives


SPM Archives

SPM Archives


SPM@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

SPM Home

SPM Home

SPM  June 2016

SPM June 2016

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: gPPI and parametric model

From:

"Indira C. Turney" <[log in to unmask]>

Reply-To:

Indira C. Turney

Date:

Wed, 15 Jun 2016 20:59:16 +0100

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (179 lines)

THANK YOU FOR YOUR QUICK RESPONSE

Parametric modulators should be fine. Were the PMs created in SPM? 
----Correct, the PMs were created in SPM

What does your config file look like?
----See below

Does gPPI create a design matrix for PPI?
----It does not create a design matrix before the error, only the specified ROI mask for each subject.

What was the rest of the screen output before you get the Estimation Failed?
----Here is a quick print out of the rest of the screen:-------
"VOI has 41 voxels in 3.800000e+000x3.800000e+000x3.800000e+000 space

VOI has 81 voxels in 3x3x3 space. This is in the the same space as the input data and functional mask.
Warning: Matrix is close to singular or badly scaled.
         Results may be inaccurate. RCOND = 1.266417e-020. 
> In spm_PEB>spm_inv at 371
  In spm_PEB at 244
  In PPPI at 684
  In gPPI_MORF at 129
  In gPPI_batch_MORF at 23
Estimation Failed
Warning: Missing conditions!!! Invalid Contrast
Invalid Contrast
PPI Contrasts were not estimated for some reason.

ans = 

        xY: [1x1 struct]
     nscan: [86 86 86 86]
       xBF: [1x1 struct]
      Sess: [1x4 struct]
       xGX: [1x1 struct]
        xX: [1x1 struct]
       xVi: [1x1 struct]
     SPMid: 'SPM8: spm_spm (v3468)'
        xM: [1x1 struct]
     xsDes: [1x1 struct]
       swd: 'S:\nad12\MORF\Analysis_ret\Relatedness_hrf\21y2108'
      xVol: [1x1 struct]
     Vbeta: [1x64 struct]
    VResMS: [1x1 struct]
        VM: [1x1 struct]
      xCon: [1x82 struct]

CONFIG FILE?:

function [] = gPPI_MORF(subject,VOI_name,PeakXYZ,VOI_size,gPPI_dir,Analysis_dir)
%% Create a VOI mask
% Go to this subjects gPPI directory. If the mask exists, move on. If the
% masks does not exist, create it.

cd([gPPI_dir filesep subject]) % Change present working directory to this subjects gPPI dir
if exist([gPPI_dir filesep subject filesep VOI_name '_mask.nii'], 'file') % if there is already a VOI image for this person, move on
else % if not...
    create_sphere_image('SPM.mat',PeakXYZ,{VOI_name},VOI_size) % create sphere around seed and save it in this subjects gPPI dir
end

%% Load first level univariate parameters and remove 'Run#_' from the beginning of regressor names
% -Note, this section of code permantely changes the SPM.mat file parameters
% -The regressors will not longer have 'Run#_' appended to the front of
% their name
% -For example: "Run1_Rem_Rel" becomes "Rem_Rel". If run a second time,
% "Rem_Rel" becomes "el"
% Note, I added an if statement below to avoid the deletion issue which
% occurs when you run this script more then once

first_level_dir = [Analysis_dir filesep subject]; % path to subjects GLM analysis dir
cd(first_level_dir) % go to the this subject's first level directory
load SPM.mat % load this subject's SPM parameters
for k = 1:length(SPM.Sess) % for each Sessions...
    for u = 1:length(SPM.Sess(k).U) % for each Trial Type in Session k...
        if strcmp(SPM.Sess(k).U(u).name{1}(1:2),'Ru') % if this regressor has "Run" as the first 3 characters...
            SPM.Sess(k).U(u).name{1} = SPM.Sess(k).U(u).name{1}(6:end); % Remove the first 5 characters of the regressor's name
            disp(SPM.Sess(k).U(u).name{1}) % display the changes regressor name in the MATLAB Command Window
        else
        end
    end
end
save('SPM.mat','SPM') % save the SPM parameters loaded above to a file called "SPM.mat" in this subject's first level analysis directory.
                      % note this overwrites the SPM.mat file which already
                      % exists

%% Setting the gPPI Parameters

%%% For more details on the parameters below and what they mean, go to the
%%% gPPI website and download the guide: http://www.nitrc.org/projects/gppi

P.subject= subject; % A string with the subjects id
P.directory= first_level_dir; % path to the first level GLM directory
P.VOI=[gPPI_dir filesep subject filesep VOI_name '_mask.nii']; % path to the ROI image, created above
P.Region = VOI_name; % string, basename of output folder
P.Estimate=1; % Yes, estimate this gPPI model
P.contrast=0; % contrast to adjust for. Default is zero for no adjustment
P.extract='eig'; % method for ROI extraction. Default is eigenvariate
P.Tasks=['0' {'HiHit','LoHit','AllMiss','AllFA', 'AllFAxrelatedness^1','HiCR','HiCRxrelatedness^1', 'LoCR', 'LoCRAxrelatedness^1'}]; % Specify the tasks for this analysis. Think of these as trial types. Zero means "does not have to occur in every session"
%P.Tasks=['0' {'AllHits', 'AllMisses', 'FM1', 'FM2', 'FM3', 'FM4', 'CR1', 'CR2', 'CR3' ,'CR4'}];
P.Weights=[]; % Weights for each task. If you want to weight one more than another. Default is not to weight when left blank
P.maskdir = [gPPI_dir filesep subject]; % Where should we save the masks?
P.equalroi = 0; % When 1, All ROI's must be of equal size. When 0, all ROIs do not have to be of equal size
P.FLmask = 1; % restrict the ROI's by the first level mask. This is useful when ROI is close to the edge of the brain
P.VOI2={}; % specifiy a second ROI. Only used for "physiophysiological interaction"
P.analysis='psy'; % for "psychophysiological interaction"
P.method='cond'; % "cond" for gPPI and "trad" for traditional PPI
P.CompContrasts=1; % 1 to estimate contrasts
P.Weighted=0; % Weight tasks by number of trials. Default is 0 for do not weight
P.outdir = [gPPI_dir filesep subject]; % Output directory
P.ConcatR=1; % Tells gPPI toolbox to concatenate runs

% P.Contrasts(1).left={'FM1' 'FM2' 'FM3' 'FM4'}; % left side or positive side of contrast
% P.Contrasts(1).right={}; % right side or negative side of contrast
% P.Contrasts(1).STAT='T'; % T contrast
% P.Contrasts(1).Weighted=0; % Wieghting contrasts by trials
% P.Contrasts(1).MinEvents=1; % min number of event need to compute this contrast
% P.Contrasts(1).name='AllFA_vs_Baseline'; % Name of this contrast

P.Contrasts(1).left={'AllFA'}; % left side or positive side of contrast
P.Contrasts(1).right={'LoCR'}; % right side or negative side of contrast
P.Contrasts(1).STAT='T'; % T contrast
P.Contrasts(1).Weighted=0; % Wieghting contrasts by trials
P.Contrasts(1).MinEvents=1; % min number of event need to compute this contrast
P.Contrasts(1).name='AllFA_vs_LoCR'; % Name of this contrast

% P.Contrasts(2).left={'AllFA'}; % left side or positive side of contrast
% P.Contrasts(2).right={'LoCR' 'HiCR'}; % right side or negative side of contrast
% P.Contrasts(2).STAT='T'; % T contrast
% P.Contrasts(2).Weighted=0; % Wieghting contrasts by trials
% P.Contrasts(2).MinEvents=1; % min number of event need to compute this contrast
% P.Contrasts(2).name='AllFA_vs_AllCR'; % Name of this contrast
% 
% P.Contrasts(3).left={'AllFA'}; % left side or positive side of contrast
% P.Contrasts(3).right={'HiHit'}; % right side or negative side of contrast
% P.Contrasts(3).STAT='T'; % T contrast
% P.Contrasts(3).Weighted=0; % Wieghting contrasts by trials
% P.Contrasts(3).MinEvents=1; % min number of event need to compute this contrast
% P.Contrasts(3).name='AllFA_vs_HiHit'; % Name of this contrast
% 
% P.Contrasts(4).left={'AllFA'}; % left side or positive side of contrast
% P.Contrasts(4).right={'HiHit' 'LoHit'}; % right side or negative side of contrast
% P.Contrasts(4).STAT='T'; % T contrast
% P.Contrasts(4).Weighted=0; % Wieghting contrasts by trials
% P.Contrasts(4).MinEvents=1; % min number of event need to compute this contrast
% P.Contrasts(4).name='AllFA_vs_AllHit'; % Name of this contrast
% 
% P.Contrasts(5).left={'AllFA'}; % left side or positive side of contrast
% P.Contrasts(5).right={'none'}; % right side or negative side of contrast
% P.Contrasts(5).STAT='T'; % T contrast
% P.Contrasts(5).Weighted=0; % Wieghting contrasts by trials
% P.Contrasts(5).MinEvents=1; % min number of event need to compute this contrast
% P.Contrasts(5).name='AllFA'; % Name of this contrast
% 
% P.Contrasts(6).left={'LoCR' 'HiCR'}; % left side or positive side of contrast
% P.Contrasts(6).right={'none'}; % right side or negative side of contrast
% P.Contrasts(6).STAT='T'; % T contrast
% P.Contrasts(6).Weighted=0; % Wieghting contrasts by trials
% P.Contrasts(6).MinEvents=1; % min number of event need to compute this contrast
% P.Contrasts(6).name='AllCR'; % Name of this contrast
% 
% P.Contrasts(7).left={'HiHit' 'LoHit'}; % left side or positive side of contrast
% P.Contrasts(7).right={'none'}; % right side or negative side of contrast
% P.Contrasts(7).STAT='T'; % T contrast
% P.Contrasts(7).Weighted=0; % Wieghting contrasts by trials
% P.Contrasts(7).MinEvents=1; % min number of event need to compute this contrast
% P.Contrasts(7).name='AllHit'; % Name of this contrast

%% Below are parameters for gPPI. All set to zero for do not use. See website
%% for more details on what they do.
P.ConcatR=1;
P.FSFAST=0;
P.peerservevarcorr=0;
P.wb=0;
P.zipfiles=0;
P.rWLS=0;

%% Actually Run PPI
PPPI(P)

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

May 2024
April 2024
March 2024
February 2024
January 2024
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
2006
2005
2004
2003
2002
2001
2000
1999
1998


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager