NDK_GINI

int __stdcall NDK_GINI ( double *  X,
size_t  N,
double *  retVal 
)

Returns the sample Gini coefficient, a measure of statistical dispersion.

Returns
status code of the operation
Return values
NDK_SUCCESS Operation successful
NDK_FAILED Operation unsuccessful. See Macros for full list.
Parameters
[in] X is the input data sample (must be non-negative) (a one dimensional array of values).
[in] N is the number of observations in X.
[out] retVal is the calculated value of this function.
Remarks
1. A low Gini coefficient indicates a more equal distribution, with 0 corresponding to complete equality. Higher Gini coefficients indicate more unequal distributions, with 1 corresponding to complete inequality.
2. The input data series may include missing values (NaN), but they will not be included in the calculations.
3. The values in the input data series must be non-negative.
4. The Gini coefficient is computed as follows:
\[G(S)=1-\frac{2}{n-1}\left ( n-\frac{\sum_{i=1}^{n}iy_i}{\sum_{i=1}^{n}y_i} \right )\]
Where:
  • \(h\) is the input data series ( \(h\)) arranged in descending order, so that \(y_i\leq y_{i+1}\).
  • \(n\) is the number of non-missing values in the input time series data sample.
NDK_RMD().
7. \(G(S)\) is a consistent estimator of the population Gini coefficient, but is generally unbiased (except when the population mean is known).
8. Developed by the Italian statistician Corrado Gini in 1912, the Gini coefficient is commonly used as a measure of comparative income or wealth. Where zero (0) corresponds to complete equality and one (1) to complete inequality.
Requirements
Header SFSDK.H
Library SFSDK.LIB
DLL SFSDK.DLL
Examples


   
Namespace:  NumXLAPI
Class:  SFSDK
Scope:  Public
Lifetime:  Static
int NDK_GINI ( double[]   pData,
UIntPtr  nSize,
ref double  retVal 
)

Returns the sample Gini coefficient, a measure of statistical dispersion.

Return Value

a value from NDK_RETCODE enumeration for the status of the call. 

NDK_SUCCESS  operation successful
Error  Error Code
Parameters
[in] pData is the input data sample (must be non-negative) (a one dimensional array of values).
[in] nSize is the number of observations in pData.
[out] retVal is the calculated value of this function.
Remarks
1. A low Gini coefficient indicates a more equal distribution, with 0 corresponding to complete equality. Higher Gini coefficients indicate more unequal distributions, with 1 corresponding to complete inequality.
2. The input data series may include missing values (NaN), but they will not be included in the calculations.
3. The values in the input data series must be non-negative.
4. The Gini coefficient is computed as follows:
\[G(S)=1-\frac{2}{n-1}\left ( n-\frac{\sum_{i=1}^{n}iy_i}{\sum_{i=1}^{n}y_i} \right )\]
Where:
  • \(h\) is the input data series ( \(h\)) arranged in descending order, so that \(y_i\leq y_{i+1}\).
  • \(n\) is the number of non-missing values in the input time series data sample.
NDK_RMD().
7. \(G(S)\) is a consistent estimator of the population Gini coefficient, but is generally unbiased (except when the population mean is known).
8. Developed by the Italian statistician Corrado Gini in 1912, the Gini coefficient is commonly used as a measure of comparative income or wealth. Where zero (0) corresponds to complete equality and one (1) to complete inequality.
Exceptions
Exception Type Condition
None N/A
Requirements
Namespace NumXLAPI
Class SFSDK
Scope Public
Lifetime Static
Package NumXLAPI.DLL
Examples

	
References
* Hamilton, J .D.; Time Series Analysis , Princeton University Press (1994), ISBN 0-691-04289-6
* Tsay, Ruey S.; Analysis of Financial Time Series John Wiley & SONS. (2005), ISBN 0-471-690740
* D. S.G. Pollock; Handbook of Time Series Analysis, Signal Processing, and Dynamics; Academic Press; Har/Cdr edition(Nov 17, 1999), ISBN: 125609906
* Box, Jenkins and Reisel; Time Series Analysis: Forecasting and Control; John Wiley & SONS.; 4th edition(Jun 30, 2008), ISBN: 470272848