[GRASS-dev] Re: [GRASS GIS] #474: r.quantile: segfaults with percentile=100

Dylan Beaudette debeaudette at ucdavis.edu
Wed Feb 11 12:46:13 EST 2009


On Wednesday 11 February 2009, GRASS GIS wrote:
> #474: r.quantile: segfaults with percentile=100
> ---------------------+-----------------------------------------------------
>- Reporter:  hamish  |       Owner:  grass-dev at lists.osgeo.org
>       Type:  defect  |      Status:  closed
>   Priority:  major   |   Milestone:  6.4.0
>  Component:  Raster  |     Version:  svn-develbranch6
> Resolution:  fixed   |    Keywords:  r.quantile
>   Platform:  Linux   |         Cpu:  x86-32
> ---------------------+-----------------------------------------------------
>- Comment (by glynn):
>
>  Replying to [comment:4 hamish]:
>  > I notice that if you do 'quant=3' you only get 2 results, and 'quant=1'
>
>  gives no output. (all others do the same, report n-1)
>
>  > Is this intended because 3 bins will have two separators (at 33% and
>
>  66%), or is it a bug?
>
>  It's intended so that quant=N gives "N-tiles", e.g. quant=4 gives
>  quartiles, quant=10 gives deciles, etc. AIUI, the convention is not to
>  include the endpoints, e.g. "quartiles" are given as 25%, 50%, and 75%.

Is this a convention? I am not a math/stats expert, but in R I see that the 
convetion is to report it like this:

# generate some random data
x <- rnorm(100)
# compute quartiles:
quantile(x)
        0%        25%        50%        75%       100% 
-2.1691897 -0.3627331  0.1307290  0.6652009  2.4798260 

# we can see that it includes the min/max:
summary(x)
    Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
-2.16900 -0.36270  0.13070  0.07639  0.66520  2.48000

Is this just a display/semantics thing?

Dylan


-- 
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341


More information about the grass-dev mailing list