help > "PPI Contrasts were not estimated for some reason" massage when running the attention tutorial
Showing 1-13 of 13 posts
Display:
Results per page:
Feb 28, 2018  01:02 PM | noamagal
"PPI Contrasts were not estimated for some reason" massage when running the attention tutorial
Hi Everyone!
I've try to run the attention tutorial from the manual. i've configured the PPPI parameter construct (just copy-pasted it). when i run the command PPPI(P)
i get this massage: 
Warning: Missing conditions!!! Invalid Contrast
Invalid Contrast
Warning: Missing conditions!!! Invalid Contrast
Invalid Contrast
Warning: Missing conditions!!! Invalid Contrast
Invalid Contrast
Generate Contrasts
PPI Contrasts were not estimated for some reason.

can you help me with this? i can't figure out where the problem is. 

thank you in advance for the help!
Mar 1, 2018  03:03 AM | Donald McLaren
RE: "PPI Contrasts were not estimated for some reason" massage when running the attention tutorial
Please attached the parameter structure P and the gPPI first-level model, then I will be able to troubleshoot the issue.

Also, if there was any screen output earlier, that would be helpful as well.

I am currently migrating much of the code to python, so most of the code will be python based with calls to SPM in Matlab if SPM is being used to estimate the models.
Mar 5, 2018  07:03 AM | noamagal
RE: "PPI Contrasts were not estimated for some reason" massage when running the attention tutorial
Hi! 
This is the first-level model
Attachment: SPM.mat
Mar 5, 2018  07:03 AM | noamagal
RE: "PPI Contrasts were not estimated for some reason" massage when running the attention tutorial
and this is the P structure. 

thank you! i hope this helps.
Attachment: P.mat
Mar 6, 2018  04:03 PM | Donald McLaren
RE: "PPI Contrasts were not estimated for some reason" massage when running the attention tutorial
Hi,

The issue was that the PPI model was not being estimated. There should've been a line above those ones you copied that said "Estimation Failed".

Please find a patched file to solve the issue. Simply replace the older file.

Best,
Donald
Attachment: spm_estimate_PPI.m
Mar 7, 2018  06:03 PM | Konstantinos Bromis
RE: "PPI Contrasts were not estimated for some reason" massage when running the attention tutorial
Dear All,

I have the same issue regarding the estimation failure on the attention tutorial. I replaced the old spm_estimate_PPI.m file with the updated patch file but instead I have this error:

VOI has 549 voxels in 3x3x3 space

VOI has 549 voxels in 3x3x3 space. This is in the the same space as the input data and functional mask.
VOI has 549 voxels in 3x3x3 space
VOI has 549 voxels in 3x3x3 space. This is in the the same space as the input data and functional mask.
Estimation Failed
Warning: Missing conditions!!! Invalid Contrast
Invalid Contrast
Warning: Missing conditions!!! Invalid Contrast
Invalid Contrast
PPI Contrasts were not estimated for some reason.

Any idea on how to solve this issue?

Best regards,

Konstantinos
Mar 7, 2018  06:03 PM | Donald McLaren
RE: "PPI Contrasts were not estimated for some reason" massage when running the attention tutorial
Hi,

The model did not estimate.

Can you please provide the SPM.mat file, the P structure, the matlab version, and the file tree you are using?

Also, can you try:
SPM=spm_estimate_PPI(P.subject,'SPM.mat',P.Region,P.method,P.analysis,P.CompContrasts,0,[],0,0)

Best,
Donald
Mar 8, 2018  02:03 PM | Konstantinos Bromis
RE: "PPI Contrasts were not estimated for some reason" massage when running the attention tutorial
Hi,


I use Matlab 2017b.

P =

struct with fields:
subject: 'sampleData_Study'
directory: '/home/bromis/gppi/NITRC-gppi-Downloads/running_gPPI_generic/running_gPPI_generic/sampleData/stats'
VOI: '/home/bromis/gppi/NITRC-gppi-Downloads/running_gPPI_generic/running_gPPI_generic/rmedPrecCing.nii'
Region: 'rmedPrec'
analysis: 'psy'
method: 'cond'
Estimate: 1
contrast: 0
extract: 'eig'
Tasks: {1×13 cell}
Weights: []
equalroi: 1
FLmask: 0
CompContrasts: 1
Contrasts: [1×2 struct]

Parameters used:
Processing subject: sampleData_Study
VOI file : /home/bromis/gppi/NITRC-gppi-Downloads/running_gPPI_generic/running_gPPI_generic/rmedPrecCing.nii
Output file will be: sampleData_Study_rmedPrec_session#_cond_PPI_regressors.txt
Contrast : No adjustment
Analysis : Psychophysiological Interactions
Extraction : eigenvariate
Tasks : _0_etoh_on_onsets_run1_etoh_off_onsets_run1_etoh_urge_onsets_run1_attn_on_onsets_run1_attn_off_onsets_run1_attn_urge_onsets_run1_etoh_on_onsets_run2_etoh_off_onsets_run2_etoh_urge_onsets_run2_attn_on_onsets_run2_attn_off_onsets_run2_attn_urge_onsets_run2
Method : Condition Specific


I have changed the arguments in the spm_estimate_PPI function as you proposed but nothing changed.
Attachment: SPM.mat
Mar 8, 2018  04:03 PM | Donald McLaren
RE: "PPI Contrasts were not estimated for some reason" massage when running the attention tutorial
Hi,

I didn't mean for you to change the arguments in the actual scripts.

I meant, open matlab, navigate to the first level directory of the task, load the parameter file, then run:

SPM=spm_estimate_PPI(P.subject,'SPM.mat',P.Region,P.method,P.analysis,P.CompContrasts,0,[],0,0)

Please let me know the output of this. There is an error happening somewhere, but with the try/catch statements in the code, which are designed to allow the program to move onto the next subject, the error messages are suppressed.

Best,
Donald
Mar 8, 2018  05:03 PM | Konstantinos Bromis
RE: "PPI Contrasts were not estimated for some reason" massage when running the attention tutorial
Hi,

I followed your instructions and I got the errors as seen below.



>> SPM=spm_estimate_PPI(P.subject,'SPM.mat',P.Region,P.method,P.analysis,P.CompContrasts,0,[],0,0)

SPM12: spm_fMRI_design (v7210) 17:03:32 - 08/03/2018
========================================================================
Saving fMRI design : ...SPM.mat saved

SPM12: spm_fmri_spm_ui (v7018) 17:03:32 - 08/03/2018
========================================================================
Mapping files : ...done
Calculating globals : ...done
Saving SPM configuration : ...SPM.mat saved
estimate_PPI.m

SPM12: spm_spm (v7120) 17:03:36 - 08/03/2018
========================================================================
Chunk 1/2 : ...processingError using file2mat (line 16)
file2mat.c not compiled - see Makefile

Error in file_array/subsref>multifile2mat (line 179)
val(cc(i)+1:cc(i+1)) = file2mat(obj,int64(1),int64(x(y==i)));

Error in file_array/subsref>subfun (line 99)
t = multifile2mat(sobj,varargin{:});

Error in file_array/subsref (line 65)
t = subfun(sobj,args{:});

Error in nifti/subsref>rec (line 221)
t = subsref(t,subs(2:end));

Error in nifti/subsref (line 45)
varargout = rec(opt,subs);

Error in spm_data_read (line 62)
Y(i,:) = reshape(V(i).private.dat(ind{:}),1,[]);

Error in spm_spm (line 589)
Y(j,cmask) = spm_data_read(VY(j),chunk(cmask));%-Read chunk of data

Error in spm_estimate_PPI (line 312)
SPM=spm_spm(SPM);


Best,

Konstantinos
Mar 8, 2018  07:03 PM | Donald McLaren
RE: "PPI Contrasts were not estimated for some reason" massage when running the attention tutorial
Hi,

This is an SPM issue and is related to file2mat.c in spm_spm, which is distributed by the SPM group, not the PPPI toolbox.

I believe that you need to compile file2mat.c for your computer. I'd suggest that you email the SPM list.

Best,
Donald
Feb 21, 2024  05:02 AM | sancy Luo - Beijing Normal University
RE: "PPI Contrasts were not estimated for some reason" massage when running the attention tutorial

Thank you very much, it works

Feb 21, 2024  02:02 PM | sancy Luo - Beijing Normal University
RE: "PPI Contrasts were not estimated for some reason" massage when running the attention tutorial

Later, I discovered that when I placed the MarsBar toolbox into the spm8/toolbox/ directory and subsequently added a directory containing both the MarsBar toolbox and the spm8 toolbox (which also included MarsBar within the spm8/toolbox/marsbar directory), the MarsBar toolbox was inadvertently added twice, leading to an invalid contrast error. However, by solely adding the path with the spm8 toolbox, ensuring that the MarsBar toolbox was added only once, the error vanished. Amazing!