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
.
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
sdist('tinv', 0.995, 25)
sdist('finv', 0.99, 3, 20)
sdist('tcdf', 3.314, 115) >= 0.999