spm_P_clusterFDR.m 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. function [Q] = spm_P_clusterFDR(k,df,STAT,R,n,ui,Ps)
  2. % Return the corrected FDR q-value
  3. % FORMAT [Q] = spm_P_clusterFDR(k,df,STAT,R,n,ui,Ps)
  4. %
  5. % k - extent {RESELS}
  6. % df - [df{interest} df{residuals}]
  7. % STAT - Statistical field
  8. % 'Z' - Gaussian field
  9. % 'T' - T - field
  10. % 'X' - Chi squared field
  11. % 'F' - F - field
  12. % R - RESEL Count {defining search volume}
  13. % n - Conjunction number
  14. % ui - feature-inducing threshold
  15. % Ps - Vector of sorted (ascending) p-values
  16. % Q - FDR q-value
  17. %__________________________________________________________________________
  18. %
  19. % References
  20. %
  21. % J.R. Chumbley and K.J. Friston, "False discovery rate revisited: FDR and
  22. % topological inference using Gaussian random fields". NeuroImage,
  23. % 44(1):62-70, 2009.
  24. %
  25. % J.R. Chumbley, K.J. Worsley, G. Flandin and K.J. Friston, "Topological
  26. % FDR for NeuroImaging". Under revision.
  27. %__________________________________________________________________________
  28. % Copyright (C) 2009 Wellcome Trust Centre for Neuroimaging
  29. % Justin Chumbley & Guillaume Flandin
  30. % $Id: spm_P_clusterFDR.m 2764 2009-02-19 15:30:03Z guillaume $
  31. % Compute uncorrected p-values based on k using Random Field Theory
  32. %--------------------------------------------------------------------------
  33. [P, Z] = spm_P_RF(1, k, ui, df, STAT, R, n);
  34. % q value using the Benjamini & Hochberch False Discovery Rate procedure
  35. %--------------------------------------------------------------------------
  36. Q = spm_P_FDR(Z, df, 'P', n, Ps);