:orphan:
.. _ahelp_3dNormalityTest:
***************
3dNormalityTest
***************
.. contents:: :local:

.. codeblock:: none
Program: 3dNormalityTest
* This program tests the input values at each voxel for normality,
using the AndersonDarling method:
http://en.wikipedia.org/wiki/AndersonDarling_test
* Each voxel must have at least 5 values (subbricks).
* The resulting dataset has the AndersonDarling statistic converted
to an exponentially distributed variable, so it can be thresholded
with the AFNI slider and display a nominal pvalue below. If you
want the AD statistic unconverted, use the 'noexp' option.
* Conversion of the AD statistic to a pvalue is done via simulation
of the null distribution.
OPTIONS:

input dset = Specifies the input dataset.
Alternatively, the input dataset can be given as the
last argument on the command line, after all other
options.
prefix ppp = Specifies the name for the output dataset.
noexp = Do not convert the AD statistic to an exponentially
distributed value  just leave the raw AD score in
the output dataset.
pval = Output the results as a pure (estimated) pvalue.
EXAMPLES:

(1) Simulate a 2D square dataset with the values being normal on one
edge and exponentially distributed on the other, and mixed inbetween.
3dUndump dimen 101 101 1 prefix UUU
3dcalc datum float a UUU+orig b '1D: 0 0 0 0 0 0 0 0 0 0' prefix NNN \
expr 'i*gran(0,1.4)+(100i)*eran(4)'
rm f UUU+orig.*
3dNormalityTest prefix Ntest input NNN+orig
afni com 'OPEN_WINDOW axialimage' Ntest+orig
In the above script, the UUU+orig dataset is created just to provide a spatial
template for 3dcalc. The '1D: 0 ... 0' input to 3dcalc is a time template
to create a dataset with 10 time points. The values are random deviates,
ranging from pure Gaussian where i=100 to pure exponential at i=0.
(2) Simulate a single logistic random variable into a 1D file and compute
the AD nominal pvalue:
1deval num 200 expr 'lran(2)' > logg.1D
3dNormalityTest input logg.1D\' prefix stdout: pval
Note the necessity to transpose the logg.1D file (with the \' operator),
since 3D programs interpret each 1D file row as a voxel time series.
++ March 2012  by The Ghost of Carl Friedrich Gauss
++ Compile date = Jun 14 2021 {AFNI_21.1.12:linux_ubuntu_16_64}