


Conversion among various statistics
FORMAT P = nifti_stats(VAL,CODE,OPT,PARAM)
CODE can be one of
'CORREL' 'TTEST' 'FTEST' 'ZSCORE'
'CHISQ' 'BETA' 'BINOM' 'GAMMA'
'POISSON' 'NORMAL' 'FTEST_NONC' 'CHISQ_NONC'
'LOGISTIC' 'LAPLACE' 'UNIFORM' 'TTEST_NONC'
'WEIBULL' 'CHI' 'INVGAUSS' 'EXTVAL'
'PVAL'
With only one input argument, CODE defaults to 'ZSCORE'
OPT can be one of
'-p' ==> output P = Prob(statistic < VAL).
'-q' ==> output is 1-p.
'-d' ==> output is probability density.
'-1' ==> output is X such that Prob(statistic < x) = VAL.
'-z' ==> output is Z such that Normal cdf(Z) = p(VAL).
'-h' ==> output is Z such that 1/2-Normal cdf(Z) = p(VAL).
With less than three input arguments, OPT defaults to '-p'.
PARAM are up to three distribution parameters.
These default to zero if unspecified.
P is an array with the same dimensions as VAL.
_______________________________________________________________________
99.99% of the work by RW Cox - SSCC/NIMH/NIH/DHHS/USA/EARTH - March 2004
0.01% of the work (the mex wrapper) by John Ashburner - FIL/ION/UCL
Copyright (C) 2005 Wellcome Department of Imaging Neuroscience


0001 function varargout = nifti_stats(varargin) 0002 % Conversion among various statistics 0003 % FORMAT P = nifti_stats(VAL,CODE,OPT,PARAM) 0004 % CODE can be one of 0005 % 'CORREL' 'TTEST' 'FTEST' 'ZSCORE' 0006 % 'CHISQ' 'BETA' 'BINOM' 'GAMMA' 0007 % 'POISSON' 'NORMAL' 'FTEST_NONC' 'CHISQ_NONC' 0008 % 'LOGISTIC' 'LAPLACE' 'UNIFORM' 'TTEST_NONC' 0009 % 'WEIBULL' 'CHI' 'INVGAUSS' 'EXTVAL' 0010 % 'PVAL' 0011 % With only one input argument, CODE defaults to 'ZSCORE' 0012 % 0013 % OPT can be one of 0014 % '-p' ==> output P = Prob(statistic < VAL). 0015 % '-q' ==> output is 1-p. 0016 % '-d' ==> output is probability density. 0017 % '-1' ==> output is X such that Prob(statistic < x) = VAL. 0018 % '-z' ==> output is Z such that Normal cdf(Z) = p(VAL). 0019 % '-h' ==> output is Z such that 1/2-Normal cdf(Z) = p(VAL). 0020 % With less than three input arguments, OPT defaults to '-p'. 0021 % 0022 % PARAM are up to three distribution parameters. 0023 % These default to zero if unspecified. 0024 % 0025 % P is an array with the same dimensions as VAL. 0026 % 0027 %_______________________________________________________________________ 0028 % 99.99% of the work by RW Cox - SSCC/NIMH/NIH/DHHS/USA/EARTH - March 2004 0029 % 0.01% of the work (the mex wrapper) by John Ashburner - FIL/ION/UCL 0030 % Copyright (C) 2005 Wellcome Department of Imaging Neuroscience 0031 0032 % 0033 % $Id: nifti_stats.m 253 2005-10-13 15:31:34Z guillaume $ 0034 0035 0036 fprintf('******************************************\n'); 0037 fprintf('Compile the nifti_stats function with\n'); 0038 fprintf(' mex nifti_stats.c nifti_stats_mex.c -O\n'); 0039 fprintf('******************************************\n'); 0040 0041 error('nifti_stats is not compiled.');