User Tools

Site Tools


sdist
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


sdist [2010/06/10 23:54] (current) – created jochen
Line 1: Line 1:
 +====== sdist - statistical distribution functions ======
  
 +===== Motivation =====
 +For many tasks in statistical hypothesis testing, it is necessary to find the ordinate value where the cumulative distibution function reaches a particular value (inverse of the CDF). These functions are available in Matlab's stats toolbox, but to allow users without this toolbox to use NeuroElf, freely available code has been edited and put into one compound function, ''sdist''.
 +
 +===== Function reference ('help sdist') =====
 +<file>  sdist  - statistics distributions
 + 
 +  FORMAT:       d = sdist(type, variate, df1 [, df2 [, pin]])
 + 
 +  Input fields:
 + 
 +        type        either of 'betacdf', 'betainv', 'betapdf',
 +                    'fcdf', 'finv', 'fpdf', 'tcdf', 'tinv', 'tpdf'
 +        variate     variate (or p-value)
 +        df1, df2    d.f. (or other required parameter)
 +        pin         logical flag, inverse from 0.9 to 0.1 logic
 + 
 +  Output fields:
 + 
 +        d           determined value of requested distribution function
 +</file>
 +
 +===== Usage examples =====
 +  * find the value required to threshold a t-map with 25 degrees of freedom at p<0.005 (uncorr.):<code matlab>sdist('tinv', 0.995, 25)</code>
 +  * find the value required to threshold an F-map with (3, 20) degrees of freedom at p<0.01 (uncorr.):<code matlab>sdist('finv', 0.99, 3, 20)</code>
 +  * find out if a given t-statistic (3.314, df = 115) is enough to meet a specific alpha criterion (0.001):<code matlab>sdist('tcdf', 3.314, 115) >= 0.999</code>
sdist.txt · Last modified: 2010/06/10 23:54 by jochen