Mike,
I've attached the code that operates the "Set Using FDR" button in qdec.
First have a look at the routine SetSurfaceScalarsColorsUsingFDR in vtkQdecWindow.cxx, which calls our FDR library and returns a threshold. Then, it calls the routine SetSurfaceScalarsColors after setting mid = threshold + 1.5, and max = threshold + 2.25. from there, SetSurfaceScalarsColors just checks min, mid and max against the current values (from prior run) and updates them if they differ. so basically, the 'algorithm' for mid and max appears to be just adding 1.5 and 2.25 to the threshold. I wasn't aware of this, or understand why (other than the need to set it to something!), so if you have an alternative, I'd like to hear.
Also attached are mri2.c and sig.c, which contains the core fdr2vwth routine. It appears that "if no values meet the FDR criterion, then a value slightly smaller than the smallest p is returned."
I've updated the code to print to the terminal the number of vertices having a P < the fdr min, although it seems to always be a large number of vertices because the fdr min is a positive value, and a typical result has both positive and negative P values.
Nick
On Thu, 2008-12-11 at 17:09 -0600, Michael Harms wrote:
Hello, I'm curious, what algorithm is used for setting the "mid" and "max" threshold values in QDEC when using the "Set Using FDR" button?
And, what does the algorithm do for setting the "min" threshold when no single p-value is significant enough to satisfy the necessary inequality for the specified FDR Rate? In that case, is the resulting "min" just set to the -log10(p) of the most significant p-value?
If easy to implement, it would be handy if the output to the terminal reported the number of vertices with P < than the FDR determined "min" threshold.
cheers, Mike H.