pdk.Math.Descriptive ($Date: 2002/12/04 10:16:02 $)
index
pdk/Math/Descriptive.py

Descriptive statistical functions.

FOG 11.1999,07.2002

 
Functions
            
average(data, axis=0)
average of a sequence along an axis.
center(M, axis=0)
centers a matrix along an axis(i.e., subtracts the mean from all values).
center_of_mass(dataA, startPosition=None)
Purpose:calculates the center of mass for a 2D data array
Detail:iterative algorithm that uses the 1D center of mass of a horizontal and a vertical line through a starting point startPosition (defaults to the center of the data array dataA) for finding the 2D center of mass. Note that this algorithm works only for continuous, Gaussian-type gray value distributions - small hot spots might go unnoticed.
chisqu(obsV, expV)
returns the Chi-square value of observed (obsA) and expected (expA) 1d value arrays.
correlation(x, y, axis=0)
correlation of two sequences along an axis.
correlation_matrix = correlation(x, y, axis=0)
correlation of two sequences along an axis.
covariance(x, y, axis=0)
covariance of two sequences along an axis.
cpca(M1, M2, correlationFunction=<function mantel_r>)
returns the (C)orrelation of (P)ure (C)olumn (A)verages for the two 2d matrices M1 and M2 using the function given in correlationFunction for computing the correlation coefficient.
cvar(data, axis=0)
coefficient of variation (= standard deviation corrected for the mean) of a sequence along an axis.
fisher_z(r)
returns the Fisher Z-transform of a value.
hadamard(M1, M2)
returns the Hadamard product of two symmetric matrices M1 and M2 (i.e., sum_i sum_j m1_ij*m2_ij, summed over the lower triangular).
mantel_r(M1, M2, symmetric=1)
returns Mantel`s r statistics for matrix correlation for the two arrays M1 and M2. If symmetric is true, only the lower triangular elements are considered. Works with both (n x m) matrices and 1d arrays (for which it is essentially equivalent to the correlation function). See Mantel 1997: Randomization, Bootstrap and Monte Carlo Methods in Biology, Chapman&Hall, p. 174.
mantel_z(M1, M2)
Mantel`s Z statistics for - two (symmetric) distance matices (equivalent to the Hadamard product for symmetric matrices). - two 1d arrays M1 and M2 are required to have the same shape.
median(x)
returns the median of the array %x%.
pearson_r = correlation(x, y, axis=0)
correlation of two sequences along an axis.
percentil(x, p=0.5, n=1)
returns the %n%th %p% percentil of the input vector %x%.
pure_average(data, axis=0)
pure average (i.e., elements equal to zero excluded) of a sequence along an axis.
ranks(A, checkTies=1)
ranks for one-dimensional arrays. If checkTies is true, the resulting ranks are corrected for ties.
rohm_e(M1, M2)
returns Rohmesburg`s E statistics.
sample_average(data, axis=0)
Purpose:sample average of a sequence along an axis
sample_stdize(M, axis=0)
sample standardizes a matrix (i.e., subtracts the mean from all values and divides by the sample standard deviation).
sample_variance(data, axis=0)
sample variance of a sequence along an axis.
spearman_r(a1, a2, checkTies=1)
returns the Spearman`s rank correlation coefficient for the two input vectors a1 and a2. If checkTies is true, ranks are corrected for ties.
std_dev(data, axis=0)
standard deviation of a sequence along an axis.
stdize(M, axis=0)
standardizes a matrix along an axis (i.e., subtracts the mean from all values and divides by the standard deviation).
sample_std_dev(data, axis=0)
sample standard deviation of a sequence along an axis.
wawga(M1, M2)

(W)eighted (A)verage of (W)ithin (G)roup (A)verages. Returns the weighted average of within-group averages:

sum(n_i * sum(d_ij * omega(i) * omega(j) / n_i)) =         average d_ij * omega(i) * omega(j)

with

n_i: size of group i d_ij: proximity of sites i and j omega(i),``omega(j)``: binary indicator functions for group membership of sites i and j, respectively

M1 is a symmetric n x n matrix of proximities

M2 is a n x n symmetric binary matrix indicating group membership
(= values of the omega function above. n groups in total)
weighted_average(data, w, axis=0)
weighted average of a sequence along an axis. Note: for column weighted averages, w applies to rows, and vice versa!
weighted_correlation(x, y, w, axis=0)
weighted correlation of two sequences along an axis.
weighted_std_dev(data, w, axis=0)
weighted standard deviation of a sequence along an axis.
weighted_stdize(M, w, axis=0)
standardizes a matrix with weights along an axis (i.e., subtracts the weighted mean from all values and divides by the weighted standard deviation).
weighted_variance(data, w, axis=0)
weighted variance of a sequence along an axis.
variance(data, axis=0)
variance of a sequence along an axis.
 
Author
            
$Author: gathmann $