spm_P_Bonf.m 957 B

1234567891011121314151617181920212223242526272829303132
  1. function P = spm_P_Bonf(Z,df,STAT,S,n)
  2. % Return the corrected P value using Bonferroni
  3. % FORMAT P = spm_P_Bonf(Z,df,STAT,S,n)
  4. %
  5. % Z - height {minimum over n values}
  6. % df - [df{interest} df{error}]
  7. % STAT - Statistical field
  8. % 'Z' - Gaussian field
  9. % 'T' - T - field
  10. % 'X' - Chi squared field
  11. % 'F' - F - field
  12. % S - Voxel count
  13. % n - number of conjoint SPMs
  14. %
  15. % P - corrected P value - P(STAT > Z)
  16. %
  17. %__________________________________________________________________________
  18. %
  19. % spm_P_Bonf returns the p-value of Z corrected by the Bonferroni
  20. % inequality.
  21. %
  22. % If n > 1 a conjunction probability over the n values of the statistic
  23. % is returned.
  24. %__________________________________________________________________________
  25. % Copyright (C) 1999-2014 Wellcome Trust Centre for Neuroimaging
  26. % Thomas Nichols
  27. % $Id: spm_P_Bonf.m 5824 2014-01-02 14:50:13Z guillaume $
  28. P = S * spm_z2p(Z,df,STAT,n);
  29. P = min(P,1);