Extra-brain voxels are assigned NaN in beta images. Because for different
subjects different voxels are included in the analysis, this can results in
NaNs is some subjects and valid regression coeffients in others. If your
ROI is likely to cover extra-bain space than this explains the NaNs.
If you want to average across voxels with some NaNs, the Statistics Toolbox
provides the function "nanmean" which does what you need.
Alternatively, you can download the NaN-Suite that I wrote a while back
from the Matlab File Exchange:
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=6837
Cheers,
Jan
Alexander J. Shackman wrote:
> fslmaths -nanm will allow you to compute a NAN mask
>
> in matlab, you can also consider something like --
>
> myvar(isnan(myvar) | isinf(myvar)) = #;
>
> where # is a number (0, 1, etc)
>
> you have the load the map in first
>
> hth, ajs
>
> On Wed, Apr 9, 2008 at 1:03 PM, Linda Seltzer <[log in to unmask]
> <mailto:[log in to unmask]>> wrote:
>
> I would not substitute zero for a NaN. Beta is a value of a slope. It
> tells whether there is a linear relationship. If Beta = 0, then
> there is
> no linear relationship, which is the null hypothesis in a one-sample
> test.
> So substituting a zero for a NaN would prejudice the results in
> favor of
> the null hypothesis. I think it is best to set breakpoints in the
> spm code
> and see where the NaN is coming from when Beta is being computed and why
> some voxels and resulting in a NaN and others aren't.
> Linda Seltzer
> UC Davis
> > Dear all,
> >
> > in order to correlate a test-score with the beta-values of my
> subjects, I
> >
> > read beta-values from the images, before averaging over my ROI for
> each
> > subject. Betas in my ROI include some NaNs for some subjects. Why
> is this
> >
> > the case (different anatomy even after normalisation?)?
> > How should I handle this in averaging? (set them to 0 as I do now or
> > somehow take these voxels out of the analysis (how could this be done
> > using Matlab-code?)?)
> >
> > Thanks. Best wishes,
> > Tim
> >
>
>
>
>
> --
> Alexander J. Shackman
> Laboratory for Affective Neuroscience
> Waisman Laboratory for Brain Imaging & Behavior
> University of Wisconsin-Madison
> 1202 West Johnson Street
> Madison, Wisconsin 53706
>
> Telephone: +1 (608) 358-5025
> FAX: +1 (608) 265-2875
> EMAIL: [log in to unmask] <mailto:[log in to unmask]>
> http://psyphz.psych.wisc.edu/~shackman
>
--
Jan Gläscher, Ph.D. Div. Humanities & Social Sciences
+1 (626) 395-3898 (office) Caltech, Broad Center, M/C 114-96
+1 (626) 395-2000 (fax) 1200 California Blvd
[log in to unmask] Pasadena, CA 91125
|