Scroll to navigation

r.quantile(1grass) GRASS GIS User's Manual r.quantile(1grass)

NAME

r.quantile - Compute quantiles using two passes.

KEYWORDS

raster, algebra, statistics, percentile, quantile

SYNOPSIS

r.quantile
r.quantile --help
r.quantile [-r] input=name [quantiles=integer] [percentiles=float[,float,...]] [bins=integer] [file=name] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Flags:


Generate recode rules based on quantile-defined intervals

Allow output files to overwrite existing files

Print usage summary

Verbose module output

Quiet module output

Force launching GUI dialog

Parameters:


Name of input raster map

Number of quantiles
Default: 4

List of percentiles

Number of bins to use
Default: 1000000

Name for output file (if omitted or "-" output to stdout)

DESCRIPTION

r.quantile computes quantiles in a manner suitable for use with large amounts of data. It is using two passes.

NOTES

Quantiles are calculated following algorithm 7 from Hyndman and Fan (1996), which is also the default in R and numpy.

EXAMPLE

Calculation of elevation quantiles (printed to standard-out):

g.region raster=elevation -p
r.quantile input=elevation percentiles=0.1,1,10,25,50,75,90,99,99.9

The output of r.quantile can be used for quantile classification:

g.region raster=elevation -p
r.quantile elevation quantiles=5 -r --quiet | r.recode elevation \

out=elev_quant5 rules=-

REFERENCES

  • Hyndman and Fan (1996) Sample Quantiles in Statistical Packages, American Statistician. American Statistical Association. 50 (4): 361-365. DOI: 10.2307/2684934
  • Engineering Statistics Handbook: Percentile, NIST

SEE ALSO

r.mode, r.quant, r.recode, r.series, r.stats, r.stats.quantile, r.stats.zonal, r.statistics, r.univar, v.rast.stats

AUTHORS

Glynn Clements
Markus Metz

SOURCE CODE

Available at: r.quantile source code (history)

Accessed: Thursday Aug 01 05:16:23 2024

Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

© 2003-2024 GRASS Development Team, GRASS GIS 8.4.0 Reference Manual

GRASS 8.4.0