File: r.quantile.html

package info (click to toggle)
grass 8.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 277,040 kB
  • sloc: ansic: 460,798; python: 227,732; cpp: 42,026; sh: 11,262; makefile: 7,007; xml: 3,637; sql: 968; lex: 520; javascript: 484; yacc: 450; asm: 387; perl: 157; sed: 25; objc: 6; ruby: 4
file content (58 lines) | stat: -rw-r--r-- 1,655 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<h2>DESCRIPTION</h2>

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

<h2>NOTES</h2>

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

<h2>EXAMPLE</h2>

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

<div class="code"><pre>
g.region raster=elevation -p
r.quantile input=elevation percentiles=0.1,1,10,25,50,75,90,99,99.9
</pre></div>

The output of <em>r.quantile</em> can be used for quantile classification:

<div class="code"><pre>
g.region raster=elevation -p
r.quantile elevation quantiles=5 -r --quiet | r.recode elevation \
           out=elev_quant5 rules=-
</pre></div>

<h2>REFERENCES</h2>

<ul>
<li>Hyndman and Fan (1996) <i>Sample Quantiles in Statistical
Packages</i>, <b>American Statistician</b>. American Statistical
Association. 50 (4): 361-365. DOI: <a
href="https://doi.org/10.2307/2684934>10.2307/2684934">10.2307/2684934</a></li>
<li><a
href="https://www.itl.nist.gov/div898/handbook/prc/section2/prc262.htm"><i>Engineering
Statistics Handbook: Percentile</i></a>, NIST</li>
</ul>

<h2>SEE ALSO</h2>

<em>
<a href="r.mode.html">r.mode</a>,
<a href="r.quant.html">r.quant</a>,
<a href="r.recode.html">r.recode</a>,
<a href="r.series.html">r.series</a>,
<a href="r.stats.html">r.stats</a>,
<a href="r.stats.quantile.html">r.stats.quantile</a>,
<a href="r.stats.zonal.html">r.stats.zonal</a>,
<a href="r.statistics.html">r.statistics</a>,
<a href="r.univar.html">r.univar</a>,
<a href="v.rast.stats.html">v.rast.stats</a>
</em>

<h2>AUTHORS</h2>

Glynn Clements<br>
Markus Metz