help > gPPI Error
Showing 1-25 of 26 posts
Display:
Results per page:

1   2   Next >
Jan 29, 2016  08:01 PM | Andrew Alan - Western University
gPPI Error
Hello Dr. Donald McLaren,

I am having some trouble with an error I received while computing gPPI for two amygdala VOIs. 

The right amygdala VOI worked well, using a mask from pickatlas. 

However, when I try to compute gPPI for the left amygdala I get the following errors for 2 participants. 

1)
Index exceeds matrix dimensions.

Error in timeseries_extract (line 369)
Error in PPPI (line 461)

2)
Error using svd
Input to SVD must not contain NaN or Inf.

Error in timeseries_extract (line 378)
Error in PPPI (line 461)

I checked the mask.mat files created by the first level analysis, and they look the same as those created by other participants in which gPPI was successful. 

I also opened the omnibus F -test con-images created by gPPI, and set p=1. There appears to be no missing information that would result from a faulty mask.mat file created in the first level.

When I did an ROI analysis for the amygdala VOI using the omnibus F test, I got a cluster size of 221 with Z=2.71 for the participant I got an error for (another participant I got an error for had a similar cluster size but with a Z=4.21). Then for other participants, which ran properly, the cluster size was 220 with Zs of around 3.71

Any ideas would be much appreciated! Thank you for your time!
Feb 1, 2016  04:02 PM | Donald McLaren
RE: gPPI Error
(1) This is an odd message that rarely comes up for this line. I think I've seen it a few times.

Can you verify the line 369 in timeseries_extract is: y=y-spm_FcUtil('Y0',SPM.xCon(xY.Ic),SPM.xX.xKXs,beta);

If this is not the line, can you send me the line?

If this is the line, then the issue is likely xY.Ic. Insert 4 lines above, with the following:
xY.IC
SPM.xCon(xY.Ic)
size(SPM.xX.xKXs)
size(beta)

Then re-run with the output for the subject that failed.

(2) This is the result of having NaN or Inf values in y. At line ~365 and ~373, can you insert the following line:
sum(isnan(y))

This will help to determine if the NaN came in before or after the correction with the omnibus contrast. Then try running it again.

I'm a bit concerned that the VOI size is not the same for these two subjects. How did you generate the VOIs for each subject?

Best,
Donald


Originally posted by Andrew Alan:
Hello Dr. Donald McLaren,

I am having some trouble with an error I received while computing gPPI for two amygdala VOIs. 

The right amygdala VOI worked well, using a mask from pickatlas. 

However, when I try to compute gPPI for the left amygdala I get the following errors for 2 participants. 

1)
Index exceeds matrix dimensions.

Error in timeseries_extract (line 369)
Error in PPPI (line 461)

2)
Error using svd
Input to SVD must not contain NaN or Inf.

Error in timeseries_extract (line 378)
Error in PPPI (line 461)

I checked the mask.mat files created by the first level analysis, and they look the same as those created by other participants in which gPPI was successful. 

I also opened the omnibus F -test con-images created by gPPI, and set p=1. There appears to be no missing information that would result from a faulty mask.mat file created in the first level.

When I did an ROI analysis for the amygdala VOI using the omnibus F test, I got a cluster size of 221 with Z=2.71 for the participant I got an error for (another participant I got an error for had a similar cluster size but with a Z=4.21). Then for other participants, which ran properly, the cluster size was 220 with Zs of around 3.71

Any ideas would be much appreciated! Thank you for your time!
Feb 1, 2016  05:02 PM | Andrew Alan - Western University
RE: gPPI Error
Hello Dr McLaren,
Thank you so much for your time, I really appreciate it. 

(1) Yes this is what is written on line 369. When I insert:
xY.IC
SPM.xCon(xY.Ic)
size(SPM.xX.xKXs)
size(beta)


I get the following error. 

Reference to non-existent field 'IC'.

Error in timeseries_extract (line 366)
Error in PPPI (line 461)

(2) I inserted the line you suggested. I received the following:


VOI has 220 voxels in 2x2x2 space
VOI has 220 voxels in 2x2x2 space. This is in the the same space as the input data and functional mask.
ans =
Columns 1 through 15
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 16 through 30
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 31 through 45
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 46 through 60
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 61 through 75
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 76 through 90
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 91 through 105
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 106 through 120
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 121 through 135
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 136 through 150
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 151 through 165
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 166 through 180
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 181 through 195
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 196 through 210
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 211 through 220
0 0 0 0 0 0 0 0 0 0



Originally posted by Donald McLaren:
(1) This is an odd message that rarely comes up for this line. I think I've seen it a few times.

Can you verify the line 369 in timeseries_extract is: y=y-spm_FcUtil('Y0',SPM.xCon(xY.Ic),SPM.xX.xKXs,beta);

If this is not the line, can you send me the line?

If this is the line, then the issue is likely xY.Ic. Insert 4 lines above, with the following:
xY.IC
SPM.xCon(xY.Ic)
size(SPM.xX.xKXs)
size(beta)

Then re-run with the output for the subject that failed.

(2) This is the result of having NaN or Inf values in y. At line ~365 and ~373, can you insert the following line:
sum(isnan(y))

This will help to determine if the NaN came in before or after the correction with the omnibus contrast. Then try running it again.

I'm a bit concerned that the VOI size is not the same for these two subjects. How did you generate the VOIs for each subject?

Best,
Donald


Originally posted by Andrew Alan:
Hello Dr. Donald McLaren,

I am having some trouble with an error I received while computing gPPI for two amygdala VOIs. 

The right amygdala VOI worked well, using a mask from pickatlas. 

However, when I try to compute gPPI for the left amygdala I get the following errors for 2 participants. 

1)
Index exceeds matrix dimensions.

Error in timeseries_extract (line 369)
Error in PPPI (line 461)

2)
Error using svd
Input to SVD must not contain NaN or Inf.

Error in timeseries_extract (line 378)
Error in PPPI (line 461)

I checked the mask.mat files created by the first level analysis, and they look the same as those created by other participants in which gPPI was successful. 

I also opened the omnibus F -test con-images created by gPPI, and set p=1. There appears to be no missing information that would result from a faulty mask.mat file created in the first level.

When I did an ROI analysis for the amygdala VOI using the omnibus F test, I got a cluster size of 221 with Z=2.71 for the participant I got an error for (another participant I got an error for had a similar cluster size but with a Z=4.21). Then for other participants, which ran properly, the cluster size was 220 with Zs of around 3.71

Any ideas would be much appreciated! Thank you for your time!
Feb 1, 2016  05:02 PM | Donald McLaren
RE: gPPI Error
See below.
Originally posted by Andrew Alan:
Hello Dr McLaren,
Thank you so much for your time, I really appreciate it. 

(1) Yes this is what is written on line 369. When I insert:
xY.IC
SPM.xCon(xY.Ic)
size(SPM.xX.xKXs)
size(beta)
>>> Small typo on my part. Change the xY.IC to xY.Ic.

I get the following error. 

Reference to non-existent field 'IC'.

Error in timeseries_extract (line 366)
Error in PPPI (line 461)

(2) I inserted the line you suggested. I received the following:


VOI has 220 voxels in 2x2x2 space
VOI has 220 voxels in 2x2x2 space. This is in the the same space as the input data and functional mask.
ans =
Columns 1 through 15
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 16 through 30
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 31 through 45
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 46 through 60
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 61 through 75
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 76 through 90
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 91 through 105
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 106 through 120
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 121 through 135
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 136 through 150
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 151 through 165
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 166 through 180
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 181 through 195
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 196 through 210
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 211 through 220
0 0 0 0 0 0 0 0 0 0

>>> So the VOI volumes are no longer 219 or 221? And one of the bad subjects now runs without an error?




Originally posted by Donald McLaren:
(1) This is an odd message that rarely comes up for this line. I think I've seen it a few times.

Can you verify the line 369 in timeseries_extract is: y=y-spm_FcUtil('Y0',SPM.xCon(xY.Ic),SPM.xX.xKXs,beta);

If this is not the line, can you send me the line?

If this is the line, then the issue is likely xY.Ic. Insert 4 lines above, with the following:
xY.IC
SPM.xCon(xY.Ic)
size(SPM.xX.xKXs)
size(beta)

Then re-run with the output for the subject that failed.

(2) This is the result of having NaN or Inf values in y. At line ~365 and ~373, can you insert the following line:
sum(isnan(y))

This will help to determine if the NaN came in before or after the correction with the omnibus contrast. Then try running it again.

I'm a bit concerned that the VOI size is not the same for these two subjects. How did you generate the VOIs for each subject?

Best,
Donald


Originally posted by Andrew Alan:
Hello Dr. Donald McLaren,

I am having some trouble with an error I received while computing gPPI for two amygdala VOIs. 

The right amygdala VOI worked well, using a mask from pickatlas. 

However, when I try to compute gPPI for the left amygdala I get the following errors for 2 participants. 

1)
Index exceeds matrix dimensions.

Error in timeseries_extract (line 369)
Error in PPPI (line 461)

2)
Error using svd
Input to SVD must not contain NaN or Inf.

Error in timeseries_extract (line 378)
Error in PPPI (line 461)

I checked the mask.mat files created by the first level analysis, and they look the same as those created by other participants in which gPPI was successful. 

I also opened the omnibus F -test con-images created by gPPI, and set p=1. There appears to be no missing information that would result from a faulty mask.mat file created in the first level.

When I did an ROI analysis for the amygdala VOI using the omnibus F test, I got a cluster size of 221 with Z=2.71 for the participant I got an error for (another participant I got an error for had a similar cluster size but with a Z=4.21). Then for other participants, which ran properly, the cluster size was 220 with Zs of around 3.71

Any ideas would be much appreciated! Thank you for your time!
Feb 1, 2016  06:02 PM | Andrew Alan - Western University
RE: gPPI Error
Hello Dr. McLaren,

(1) When I insert that code to line 366, I get the following error,

Error: File: timeseries_extract.m Line: 366 Column: 16
Expression or statement is incomplete or incorrect.

Error in PPPI (line 461)

(2) Sorry let me be more clear. When I inserted that code to line 365, the participant still did not run properly. I get the same error as before but with the following:

VOI has 220 voxels in 2x2x2 space

VOI has 220 voxels in 2x2x2 space. This is in the the same space as the input data and functional mask.
ans =
Columns 1 through 15
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 16 through 30
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 31 through 45
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 46 through 60
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 61 through 75
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 76 through 90
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 91 through 105
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 106 through 120
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 121 through 135
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 136 through 150
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 151 through 165
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 166 through 180
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 181 through 195
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 196 through 210
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 211 through 220
0 0 0 0 0 0 0 0 0 0

Error using svd
Input to SVD must not contain NaN or Inf.
Error in timeseries_extract (line 380)
Error in PPPI (line 461)


Finally the VOI size changes slightly I think because I tried changing the mask threshold default in SPM to see how this would affect the error. I changed it from .8 to .5 and I still got the same errors. 

Thanks again!

Originally posted by Donald McLaren:
See below.
Originally posted by Andrew Alan:
Hello Dr McLaren,
Thank you so much for your time, I really appreciate it. 

(1) Yes this is what is written on line 369. When I insert:
xY.IC
SPM.xCon(xY.Ic)
size(SPM.xX.xKXs)
size(beta)
>>> Small typo on my part. Change the xY.IC to xY.Ic.

I get the following error. 

Reference to non-existent field 'IC'.

Error in timeseries_extract (line 366)
Error in PPPI (line 461)

(2) I inserted the line you suggested. I received the following:


VOI has 220 voxels in 2x2x2 space
VOI has 220 voxels in 2x2x2 space. This is in the the same space as the input data and functional mask.
ans =
Columns 1 through 15
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 16 through 30
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 31 through 45
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 46 through 60
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 61 through 75
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 76 through 90
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 91 through 105
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 106 through 120
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 121 through 135
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 136 through 150
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 151 through 165
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 166 through 180
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 181 through 195
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 196 through 210
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 211 through 220
0 0 0 0 0 0 0 0 0 0

>>> So the VOI volumes are no longer 219 or 221? And one of the bad subjects now runs without an error?




Originally posted by Donald McLaren:
(1) This is an odd message that rarely comes up for this line. I think I've seen it a few times.

Can you verify the line 369 in timeseries_extract is: y=y-spm_FcUtil('Y0',SPM.xCon(xY.Ic),SPM.xX.xKXs,beta);

If this is not the line, can you send me the line?

If this is the line, then the issue is likely xY.Ic. Insert 4 lines above, with the following:
xY.IC
SPM.xCon(xY.Ic)
size(SPM.xX.xKXs)
size(beta)

Then re-run with the output for the subject that failed.

(2) This is the result of having NaN or Inf values in y. At line ~365 and ~373, can you insert the following line:
sum(isnan(y))

This will help to determine if the NaN came in before or after the correction with the omnibus contrast. Then try running it again.

I'm a bit concerned that the VOI size is not the same for these two subjects. How did you generate the VOIs for each subject?

Best,
Donald


Originally posted by Andrew Alan:
Hello Dr. Donald McLaren,

I am having some trouble with an error I received while computing gPPI for two amygdala VOIs. 

The right amygdala VOI worked well, using a mask from pickatlas. 

However, when I try to compute gPPI for the left amygdala I get the following errors for 2 participants. 

1)
Index exceeds matrix dimensions.

Error in timeseries_extract (line 369)
Error in PPPI (line 461)

2)
Error using svd
Input to SVD must not contain NaN or Inf.

Error in timeseries_extract (line 378)
Error in PPPI (line 461)

I checked the mask.mat files created by the first level analysis, and they look the same as those created by other participants in which gPPI was successful. 

I also opened the omnibus F -test con-images created by gPPI, and set p=1. There appears to be no missing information that would result from a faulty mask.mat file created in the first level.

When I did an ROI analysis for the amygdala VOI using the omnibus F test, I got a cluster size of 221 with Z=2.71 for the participant I got an error for (another participant I got an error for had a similar cluster size but with a Z=4.21). Then for other participants, which ran properly, the cluster size was 220 with Zs of around 3.71

Any ideas would be much appreciated! Thank you for your time!
Feb 1, 2016  06:02 PM | Donald McLaren
RE: gPPI Error
For (1) Please remove the line xY.Ic and replace it with save tmpxY.mat xY, then see if you can get the outputs for the other inserted lines. Something might be wrong with the Ic setting.

For (2) Please change the insert lines to sum(isfinite(y),2). Also add another save tmp.mat y. 

Please send me the outputs and the tmp.mat file.

Thanks,
Donald
Feb 1, 2016  07:02 PM | Andrew Alan - Western University
RE: gPPI Error
Hello Dr. McLaren,
I really appreciate all of this!

(1) I have attached the tmpxY file created when I did this. I got the same error as before.

Index exceeds matrix dimensions.

Error in timeseries_extract (line 367)
Error in PPPI (line 461)

(2) This is the error I get when making your changes. Ive also attached the tmp.mat.y file (see following reply).


VOI has 220 voxels in 2x2x2 space
VOI has 220 voxels in 2x2x2 space. This is in the the same space as the input data and functional mask.
ans =
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
220
Error using svd
Input to SVD must not contain NaN or Inf.
Error in timeseries_extract (line 382)
Error in PPPI (line 461)
Attachment: tmpxY.mat
Feb 1, 2016  07:02 PM | Andrew Alan - Western University
RE: gPPI Error
Here is the second attachment

(2) This is the error I get when making your changes. Ive also attached the tmp.mat.y file.
Attachment: tmp.mat
Feb 1, 2016  07:02 PM | Donald McLaren
RE: gPPI Error
Let's focus on the first problematic subject first.

What is line 367? Which inserted line is it? SPM.xCon(xY.Ic)?

If it is this line, then I think the issue is the 1st contrast does not exist. Can you send the SPM.mat file?

Best,
Donald
Feb 1, 2016  07:02 PM | Andrew Alan - Western University
RE: gPPI Error
Hello,

On line 367 there is SPM.xCon(xY.Ic). 

I recently re-ran the first level analysis for this participant when I changed the mask threshold default in SPM from .8 to .5.

I did not create any new contrast for this first level analysis, just created a new SPM.mat file.

When I created a meaningless con image (inputted just a 1 in contrast manager) the script ran fine.

Does gPPI need some first level con image to run, regardless of what it is?

Ive attached the SPM.mat file.
Feb 1, 2016  08:02 PM | Donald McLaren
RE: gPPI Error
SPM.mat wasn't attached.

The necessity of a contrast image depends on the settings. If you set P.contrast=1, then you do need a contrast image. In this case, it should have given you error message that the inputs aren't valid. I would advise against setting P.contrast=1; rather, set P.contrast={'Omnibus F-test for PPI Analyses'}. This is better for several reasons:
(1) It will use the same contrast for all subjects, using a number is bad in case you create an extra contrast in some subjects;
(2) It is an F-contrast to remove noise from the data before deconvolution;
(3) If the contrast does not exist, it will create the contrast.

It should also generate an error if the contrast is not created. If the contrast is not created, then it indicates a problem with the directory and file permissions.

Let me know if changing P.contrast fixes the issue with this subject.

Best,
Donald
Feb 1, 2016  08:02 PM | Donald McLaren
RE: gPPI Error
I'm still trying to track down the possible reason for the error in #2. The file you sent doesn't seem to cause any issue when I run a simple svd command on the data and contains the expected 220 voxels.
Feb 1, 2016  08:02 PM | Andrew Alan - Western University
RE: gPPI Error
Hello, when I opened up the P structure file, under contrast I have Omnibus F test, but gPPI still required a con image. 
The F contrast however was created when opening the spm.mat file of that participant. 

Do I need to rename the file name of the omnibus F-test. Not sure why else it would not work until I created a con image.


Originally posted by Donald McLaren:
SPM.mat wasn't attached.

The necessity of a contrast image depends on the settings. If you set P.contrast=1, then you do need a contrast image. In this case, it should have given you error message that the inputs aren't valid. I would advise against setting P.contrast=1; rather, set P.contrast={'Omnibus F-test for PPI Analyses'}. This is better for several reasons:
(1) It will use the same contrast for all subjects, using a number is bad in case you create an extra contrast in some subjects;
(2) It is an F-contrast to remove noise from the data before deconvolution;
(3) If the contrast does not exist, it will create the contrast.

It should also generate an error if the contrast is not created. If the contrast is not created, then it indicates a problem with the directory and file permissions.

Let me know if changing P.contrast fixes the issue with this subject.

Best,
Donald
Feb 1, 2016  08:02 PM | Donald McLaren
RE: gPPI Error
You shouldn't need to rename the file. There shouldn't be a need for generating a con image unless you are using the spmT maps to define your VOI.

Can you upload the contents of the log file and your SPM.mat file?
Feb 1, 2016  08:02 PM | Andrew Alan - Western University
RE: gPPI Error
Here is the spm.mat file. 
Originally posted by Donald McLaren:
You shouldn't need to rename the file. There shouldn't be a need for generating a con image unless you are using the spmT maps to define your VOI.

Can you upload the contents of the log file and your SPM.mat file?
Feb 1, 2016  08:02 PM | Donald McLaren
RE: gPPI Error
The attachement didn't work.
Feb 1, 2016  09:02 PM | Andrew Alan - Western University
RE: gPPI Error
-
Attachment: SPM.mat
Feb 1, 2016  09:02 PM | Andrew Alan - Western University
RE: gPPI Error
here is the log file
Feb 1, 2016  09:02 PM | Donald McLaren
RE: gPPI Error
I'm very puzzled. The Omnibus contrast is created, but xY.Ic is not set to 2 (at least from the data sent earlier).

In the most recent run, what is the value of xY.Ic from tmpxY.mat?

Is the error still on line 367?
Feb 2, 2016  12:02 AM | Andrew Alan - Western University
RE: gPPI Error
Hello Dr. McLaren,
The first error was sorted out as soon as I created a con image. The value of xY.Ic is 2 from the most recent run.

However the 2nd error, for the last participant, is still occurring even after generating a con image. 

The error is 

VOI has 220 voxels in 2x2x2 space

VOI has 220 voxels in 2x2x2 space. This is in the the same space as the input data and functional mask.
ans =
name: 'Omnibus F-test for PPI Analyses'
STAT: 'F'
c: [54x17 double]
X0: [1x1 struct]
iX0: 'c'
X1o: [1x1 struct]
eidf: 17.0000
Vcon: [1x1 struct]
Vspm: [1x1 struct]
ans =
1 1
ans =
54 220

Error using svd
Input to SVD must not contain NaN or Inf.
Error in timeseries_extract (line 383)
Error in PPPI (line 461)

Ive attached the tmpxY.mat file for this participant.
Attachment: tmpxY.mat
Feb 2, 2016  12:02 AM | Andrew Alan - Western University
RE: gPPI Error
Also, when inputting "sum(isfinite(y),2).
save tmp.mat y."

I get the following error, and Ive attached the temp file for this participant. 


VOI has 220 voxels in 2x2x2 space

VOI has 220 voxels in 2x2x2 space. This is in the the same space as the input data and functional mask.
ans =
220
.........
220
220
220
220
220

Error using svd
Input to SVD must not contain NaN or Inf.
Error in timeseries_extract (line 381)
Error in PPPI (line 461)
Feb 2, 2016  12:02 AM | Andrew Alan - Western University
RE: gPPI Error
Here is the temp file for above
Attachment: tmp.new.mat
Feb 2, 2016  12:02 AM | Andrew Alan - Western University
RE: gPPI Error
And the log file.
Feb 2, 2016  03:02 AM | Donald McLaren
RE: gPPI Error
This is quite a mystery.

The input into the SVD (y) that is saved to tmp.mat does not contain any NaN values and all the values are finite (no Inf or -Inf values), so there should be no reason for the program to crash.

I think I need to try to reproduce it from the actual dataset.

I'm sending a follow-up email off-list.

Best,
Donald
Feb 3, 2016  03:02 AM | Donald McLaren
RE: gPPI Error
With respect to the SVD error
===================

The reason this happens is that the beta image has NaNs in the VOI. These then get transferred to the y variable as y is the raw unmasked data and beta is masked by mask.nii implicitly during model estimation. Voxels outside the mask are set to NaN.

The solution is as follows:
(1) Multiple your VOI by the group analysis mask image;
(2) Set P.,FLmask=1; this will constrain the VOI to voxels inside the first-level mask
(3) Set P.equalroi=1; this will make sure all subjects have the same VOI.
*If you set P.equalroi=0, then the VOI can be different sizes for each subject. This should not be the case if you follow step (1). I prefer step 1 as it ensures the same voxels are analyzed in all subjects.
Hope this helps.
Best,
Donald

1   2   Next >