next up previous 278
Next: CCG_TRM3x - To form the trimmed mean of the given set of ordered data, returning flags showing which values are
Up: Routine Descriptions
Previous: CCG_TMN3x - Forms the n-trimmed mean of the given set of ordered data. This variant does not process variances


CCG_TRM2x - Forms the trimmed mean of the given set of ordered data, returning flags showing which values are used

Description:
The routine forms the trimmed mean of the given dataset. The alpha (as a fraction) upper and lower ordered values are removed from consideration. Then the remaining values are added and averaged. The SVAR value is a (given) best estimate of the original un-ordered population variance. The variance of the output value is formed assuming that the original dataset was normal in distribution, and is now fairly represented by the ordered statistics variances-covariances supplied in packed form in COVAR. The elements of the input array which actually contribute to the final value are flagged in the used array.

Invocation:
CALL CCG_TRM2x( ALPHA, EL, ORDDAT, ORDVAR, USED, COVAR, TMEAN, TVAR, STATUS )

Arguments:

ALPHA = REAL (Given)
The fraction of data to trim from upper and lower orders. (MUST BE GREATER THAN 0.0 AND LESS 0.5)
EL = INTEGER (Given)
The number of entries in ORDDAT.
ORDDAT( EL ) = ? (Given)
The set of ordered data for which a trimmed mean is required.
SVAR = DOUBLE PRECISION (Given)
The variance of the unordered sample now ordered in ORDDAT.
USED( EL ) = LOGICAL (Returned)
If the corresponding value in ORDDAT contributes to the final value then this is set true.
COVAR( $*$ ) = DOUBLE PRECISION (Given)
The packed variance-covariance matrix of the order statistics from a normal distribution of size EL.
TMEAN = DOUBLE PRECISION (Returned)
The trimmed mean.
TVAR = DOUBLE PRECISION (Returned)
A variance estimate of the trimmed mean.
STATUS = INTEGER (Given and Returned)
The global status.

Prior Requirements



next up previous 278
Next: CCG_TRM3x - To form the trimmed mean of the given set of ordered data, returning flags showing which values are
Up: Routine Descriptions
Previous: CCG_TMN3x - Forms the n-trimmed mean of the given set of ordered data. This variant does not process variances

KAPLIBS -- Internal subroutines used within the KAPPA package.
Starlink User Note 238
D.S. Berry
Malcolm J. Currie
9th March 2009
E-mail:ussc@star.rl.ac.uk

Copyright © 2010 Science and Technology Facilities Council