Carlos, NaN's in the contrasts images are fine. You only need to convert con image NaN's to zeros if you'll be smoothing those con images. Are the problems related to smoothness estimation? I.e. is the smoothness FWHM or Resels NaN as well? Or, are their strange values for the "Expected voxels per cluster" or "Expected number of clusters"? Is the number of the voxels in the analysis what you expect? (Mask not way too large or too small?) If there are NaN's in the smoothness estimate, look at the FWHM image (compute from the RPV image with ImCalc as FWHM = RPV.^(1/3)). Viewing this image with CheckReg with other images (e.g. the mask, or T image, ResMS (or its square root), etc). If the is *really* irregularly shaped (i.e. no contiguous voxels) it is possible to have almost all NaN's in the RPV image. -Tom On Mon, Oct 6, 2008 at 9:08 PM, Carlos Faraco <[log in to unmask]> wrote: > Dear SPMers, > > Today I read through many of the posts regarding NaNs, however I am still > confused as to what would be the best remedy for my situation. > > The problem is I keep on receiving NaNs for the p-vals on the second level > analysis. I tried changing the NaNs to 0s in the con images (which seem to > appear only or mostly outside the brain; and becasue I read not to do this > for the beta images) using ImCalc but that still doesn't work. I therefore > checked some files from some other studies we had previously done, and it > appears that setting voxels outside the brain to NaN is normal SPM > behavior. > > Is the fix for this then something that has to be modified within the SPM > code? > > Thanks, > > Carlos Faraco > > -- ____________________________________________ Thomas Nichols, PhD Director, Modelling & Genetics GlaxoSmithKline Clinical Imaging Centre Senior Research Fellow Oxford University FMRIB Centre