Function: MOMSF
Purpose: Given an array of real numbers, MOMSF returns
(depending on mode) sum, mean, variance, standard deviation,
absolute deviation, skewness, kurtosis or median.
Files: moms.c
Author: M.G.R. Vogelaar
Use: DOUBLE PRECISION MOMSF (
OPTION, INPUT INTEGER
X, INPUT REAL ARRAY
WORK, INPUT DOUBLE PRECISION ARRAY
NDAT, INPUT INTEGER
NOUT, OUTPUT INTEGER )
MOMSF 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 REAL 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. A double precision array WORK has
the same size as X and is used as a work array so that the
calculations can be performed in double precision. The data
entered in X is unchanged after a call to the function MOMSF.
X can contain blanks, but for all options exept the last,
they will be skipped in the calculations.
Updates: Feb 20, 1995: VOG, Document created.