Function File: NORMALISED = normalise_distribution (DATA)
Function File: NORMALISED = normalise_distribution (DATA, DISTRIBUTION)
Function File: NORMALISED = normalise_distribution (DATA, DISTRIBUTION, DIMENSION)

Transform a set of data so as to be N(0,1) distributed according to an idea by van Albada and Robinson. This is achieved by first passing it through its own cumulative distribution function (CDF) in order to get a uniform distribution, and then mapping the uniform to a normal distribution. The data must be passed as a vector or matrix in DATA. If the CDF is unknown, then [] can be passed in DISTRIBUTION, and in this case the empirical CDF will be used. Otherwise, if the CDFs for all data are known, they can be passed in DISTRIBUTION, either in the form of a single function name as a string, or a single function handle, or a cell array consisting of either all function names as strings, or all function handles. In the latter case, the number of CDFs passed must match the number of rows, or columns respectively, to normalise. If the data are passed as a matrix, then the transformation will operate either along the first non-singleton dimension, or along DIMENSION if present.

Notes: The empirical CDF will map any two sets of data having the same size and their ties in the same places after sorting to some permutation of the same normalised data:

normalise_distribution([1 2 2 3 4])
⇒ -1.28  0.00  0.00  0.52  1.28

normalise_distribution([1 10 100 10 1000])
⇒ -1.28  0.00  0.52  0.00  1.28

Original source: S.J. van Albada, P.A. Robinson "Transformation of arbitrary distributions to the normal distribution with application to EEG test-retest reliability" Journal of Neuroscience Methods, Volume 161, Issue 2, 15 April 2007, Pages 205-211 ISSN 0165-0270, 10.1016/j.jneumeth.2006.11.004. (http://www.sciencedirect.com/science/article/pii/S0165027006005668)

Package: statistics