Well, depending on datatype you can have zeros or NaN's to represent voxels in which (I assume) there wasn't enough variance to get a meaningful beta. Is this correct?
If you have zeros rather than NaNs you can use implicit masking to convert the zeros to NaN's.
What I did was to write a script that takes all the con images (one from each subject), and for each voxel, counts the number of NaNs. Where this is less than some threshold say 10% of the total), for each NaN, I substitute a random number from a distribution with the same mean and variance as the remaining non NaN values for that voxel, and then saves the con image with a new prefix. When you look at the new con image there's a kind of lumpy "patch" over any holes (the patch isn't smoothed of course). And what it means is that when you put the new images into a second level analysis, those voxels will be included, but they shouldn't bias the results (or at least that's what I'm asking). When the second level analysis is a between groups comparison, I compare groups at second level, I take the mean and variance across both groups, on the principle that under the null the con values will be drawn from the same distribution.
Ideally it would be good to do a Monte Carlo type analysis, but my mind boggles at how one would interpret the results at cluster level, even if one had the computing time, and it's cluster level where there is a potential problem (type II errors arising if real clusters are broken by holes).
Elizabeth
-----Original Message-----
From: Allyson C. Rosen Ph.D. [mailto:[log in to unmask]]
Sent: 15 April 2009 14:30
To: Elizabeth Liddle
Subject: Re: [SPM] NaNs in con images - second level analysis
Elizabeth,
Thanks for posting this. I was having trouble finding someone else who had NaN's in their images. It also looks like MarsBar can't find any data in functionally defined images based on this con images even though there are data there. I'm stopped dead here. I got NaN's in my first level analysis. Have you seen this?
----- Original Message -----
From: "Elizabeth Liddle" <[log in to unmask]>
To: [log in to unmask]
Sent: Wednesday, April 15, 2009 6:20:52 AM GMT -08:00 US/Canada Pacific
Subject: [SPM] NaNs in con images - second level analysis
Dear SPMers
As I understand it, when you do a second level analysis, any voxel in any of the first level con images that contains a NaN in one subject is excluded from the second level analysis. When the number of subjects is large, this can be problematic – the second level con image starts to look like a swiss cheese, and also tends to lose data from the edges. So my question is whether anyone has figured out a way of getting a statistically valid t value for voxels in which there is missing data in a smallish number of subjects. This seems to be of particular importance if you are interested in cluster level significance, because a hole in the wrong place may destroy a valid cluster.
Clearly replacing the voxel value with the mean for the rest of the subjects will understate the variance, and thus result in an inflated t value. So instead I tried replacing NaNs in voxels in which they occurred in only a small proportion of subjects with a random number drawn from a distribution with the same mean and variance as in the remaining participants’ values for that voxel.
Can anyone see a problem with this approach? Is there an alternative?
Elizabeth
_____________________________________________
Dr Elizabeth Liddle
Developmental Psychiatry
E Floor, South Block
QMC
Nottingham
NG7 2UH
Tel: +44 (0)115 823 0271
This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
|