Function: MOMSD
Purpose: Given an array of double precision numbers, MOMSD returns
(depending on mode) sum, mean, variance, standard deviation,
absolute deviation, skewness, kurtosis or median.
File: moms.c
Author: M.G.R. Vogelaar
Use: DOUBLE PRECISION MOMSD (
OPTION, INPUT INTEGER
X, INPUT DOUBLE PRECISION ARRAY
WORK, INPUT DOUBLE PRECISION ARRAY
NDAT, INPUT INTEGER
NOUT, OUTPUT INTEGER )
MOMSD Return value for one of the following options:
OPTION 1) sum
2) mean
3) variance
4) standard deviation
5) absolute deviation
6) skewness
7) kurtosis
8) median
9) minimum
10) maximum
11) number of blanks
X Double precision array
WORK Double precision work array (same size as X !!)
NDAT Length of X array
NOUT Number of values (non blank) used in calculations
Description: Calculate moments (mean, variance, skewness, and
kurtosis) and other properties (sum, standard deviation,
absolute deviation, median, minimum, maximum, and
number of blanks) of a distribution. The numbers are
stored in array X. An array WORK has the same size as X
and is used as a work array. The data entered in X is
unchanged after a call to the function MOMSD.
X can contain (double precision) blanks, but for all
options except the last, they will be skipped in the
calculations.
Updates: Feb 20, 1995: VOG, Document created.