-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Special handling for two-sided Z maps? #2
Comments
I see in Smith and Nichols (2009) the advice is this:
This suggests I should run pTFCE on the negative and positive voxels separately, recombine, and then threshold at a voxel Z value to control the two-sided FWE p < .05 by using, say |
That sounds correct - but likely you'd want to apply the updated threshold before combining. Alternatively, you could take the absolute value of the image, threshold as normal & binarize the output. Multiply the binary image by the original values to get the thresholded image. |
Dear @jflournoy and dear @janderz8, Sorry for the late replay, for some reason I didn't get notifications about this github issue. Thank you for your interests! Cheers, |
The latter solution is however not equivalent. Perhaps not even correct. So, if there are 2 voxels next to each other, one negative and the other positive, then why should both be considered as candidates in a cluster which is what taking absolute values would do. I think that the right way to do this is as suggested in the paper. |
In theory, you are right, but in practice, pTFCE uses a "simplification" at low thresholds (Z<1.1), as GRF theory is not accurate below these thresholds. The simplification is actually that no boosting is applied based on these low-threshold clusters. Thus I believe, cluster merging is only a problem if you have very strange data, e.g. neighbouring voxels having z-score values +1.2 and -1.2. But again, I agree that having two separate runs is better, as the absolute value-based solution works only due to an implementation-dependent phenomenon... |
You are the author so you know your methods best, but it appears to me that the premise of cluster-based thresholding (actually, all the postprocessing that is usually done) is that we are looking for spatially contiguous clusters (that act and behave together). Using the absolute value of the image will cause false positives because negative and positive values are going to be candidates for the same cluster (but from different association types which will not be biologically meaningful) and I don't quite see its relevance to low or high thresholds. We wrestled with this issue in our recent work FAST-fMRI and came across a solution exactly the same as your original solution. Too bad that we were not aware of pTFCE at that time (and none of the reviewers brought it up over a 2-year review process, largely caused by Hurricane Maria) otherwise we would have also evaluated the method. But it would be nice if the script does the 2-sided case also. Ideally, a R wrapper function calling the individual functions for both cases would be easy to write and ideal to avoid issues of errors being made. |
I absolutely agree, still, if the image if smooth enough and we exclude low thresholds (as the algorithm actually does) then negative and positive clusters simply won't merge with each other. Therefore, cluster stats should remain valid on the level of individual clusters. Right? The wrapper for 2-sided analysis is a good idea, I will open a new issue with a feature request so that we will remember and implement it later. Thanks for the recommendation! |
If the image is smooth, strictly speaking, clusters will likely be formed naturally. In any case, the original recommendation is the correct approach. |
Hi there, I came across this thread with the same question as @jflournoy. I found the discussion useful and coded up an R script that wraps ptfce and accepts command line arguments. If requested, it applies the two-sided correction described above by running pTFCE on the negative and positive sub-images. At present, this is a standalone script, but in the near future, it will use some classes internal to a broader R package, so make sure to use this version: https://github.com/UNCDEPENdLab/fmri.pipeline/blob/a65d4edb43d1c2c2401a3df64d63a9dc74ff1d28/inst/bin/ptfce_zstat.R. Hope this helps others, and please let me know if you see mistakes or oversights! Best wishes, |
Hi and thank you for the great software.
I ran this on a test Z map that has both positive and negative Z values, and it seems to have discarded the voxels with negative values. It appears that the user should manipulate the Z-map to be "one sided" and then reintegrate sign info if necessary. Is that correct?
The text was updated successfully, but these errors were encountered: