Loading

reducer.percentile

reducer

Pushes onto the stack an AGGREGATOR which returns the N^th^ percentile of the values for each tick.

For this reducer, GTS must be aligned and must have a value for each tick of each GTS.

The returned location and elevation are those of the chosen value or are interpolated in the same way the value is.

The percentile is computed according to the formulae in Hyndman, Rob & Fan, Yanan. (1996). Sample Quantiles in Statistical Packages. The American Statistician. Most used types are 1 when no interpolation is wanted and 7 when interpolation is wanted.

reducer.percentile is available since version 1.0.11.

See also

Signatures

Examples

//each GTS has a value for each tick. [ NEWGTS "GTS1" RENAME 10 42.0 42.0 42.0 1.0 ADDVALUE 20 NaN NaN NaN 5.0 ADDVALUE NEWGTS "GTS2" RENAME 10 NaN NaN NaN 4.0 ADDVALUE 20 44.0 44.0 44.0 3.0 ADDVALUE NEWGTS "GTS3" RENAME 10 NaN NaN NaN 3.0 ADDVALUE 20 NaN NaN NaN 8.0 ADDVALUE NEWGTS "GTS4" RENAME 10 NaN NaN NaN 3.0 ADDVALUE 20 NaN NaN NaN 2.0 ADDVALUE ] 'GTSlist' STORE [ $GTSlist [] 70.0 reducer.percentile ] REDUCE