spm_u.m 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. function [u] = spm_u(a,df,STAT)
  2. % uncorrected critical height threshold at a specified significance level
  3. % FORMAT [u] = spm_u(a,df,STAT)
  4. % a - critical probability - {alpha}
  5. % df - [df{interest} df{error}]
  6. % STAT - Statistical field
  7. % 'Z' - Gaussian field
  8. % 'T' - T - field
  9. % 'X' - Chi squared field
  10. % 'F' - F - field
  11. % 'P' - P - value
  12. %
  13. % u - critical height {uncorrected}
  14. %__________________________________________________________________________
  15. %
  16. % spm_u returns the uncorrected critical threshold at a specified
  17. % significance
  18. %__________________________________________________________________________
  19. % Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
  20. % Karl Friston
  21. % $Id: spm_u.m 2690 2009-02-04 21:44:28Z guillaume $
  22. if STAT == 'Z'
  23. u = spm_invNcdf(1 - a );
  24. elseif STAT == 'T'
  25. u = spm_invTcdf(1 - a,df(2));
  26. elseif STAT == 'X'
  27. u = spm_invXcdf(1 - a,df(2));
  28. elseif STAT == 'F'
  29. u = spm_invFcdf(1 - a,df );
  30. elseif STAT == 'P'
  31. u = a;
  32. end