- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑
Description:
This
routine finds a value which can be associated with the half- weight value. It sums all weights then
finds a value for the half-weight. The comparison with the half-weight value proceeds in halves of
the weights for each data point (half of the first weight, then the second half of the first
weight and the first half of the second weight etc.) until the half weight is exceeded. The
data values around this half weight position are then found and a linear interpolation of
these values is the weighted median. This routine also uses the order statistic covariance
array (for a population NENT big) to estimate the change in the variance from a optimal
measurement from the given population, returning the adjusted variance.
Invocation
CALL
KPG1_WTM3R( ORDDAT, WEIGHT, VAR, NENT, COVAR, RESULT, RESVAR, STATUS )
Arguments
ORDDAT( NENT ) = REAL (Given)
The list of ordered data for which the weighted
median is required
WEIGHT( NENT ) = REAL (Given)
The weights of the values.
VAR( NSET ) = REAL (Given)
The variance of the unordered sample now ordered in
ARR.
NENT = INTEGER (Given)
The number of entries in the data array.
COVAR(
) =
DOUBLE PRECISION (Given)
The packed variance-covariance matrix of the order statistics from a
normal distribution of size NENT.
RESULT = REAL (Returned)
The weighted median
RESVAR =
REAL (Returned)
The variance of result.
STATUS = INTEGER (Given and Returned)
The global
status.
Notes:
Prior Requirements
- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑