#359: r.quantile computes incorrect values with default number of bins
------------------------+---------------------------------------------------
 Reporter:  dylan       |       Owner:  [email protected]
     Type:  defect      |      Status:  new                      
 Priority:  major       |   Milestone:  6.4.0                    
Component:  default     |     Version:  svn-develbranch6         
 Keywords:  r.quantile  |    Platform:  Linux                    
      Cpu:  x86-32      |  
------------------------+---------------------------------------------------
 I noticed that when computing quantiles from a highly skewed distribution,
 incorrect values are returned with the default number of bins. Reducing
 the number of bins seems to correct the problem

 Example, based on attached raster file in GRASS ASCII format:

 {{{
 r.quantile in=beam_150 quantiles=5

 0:20.000000:7440.040527
 1:40.000000:7512.872559
 2:60.000000:7611.160645
 3:80.000000:7611.161133

 r.quantile in=beam_150 quantiles=5 bins=10')

 0:20.000000:7440.040527
 1:40.000000:7512.872559
 2:60.000000:7570.587402
 3:80.000000:7611.161133
 }}}


 Quantiles computed in R:
 {{{
 library(spgrass6)

 x <- readRAST6('beam_150')

 quantile([EMAIL PROTECTED], prob=c(0,0.2,0.4,0.6,0.8,1), na.rm=TRUE)

       0%      20%      40%      60%      80%     100%
 6429.886 7440.040 7512.871 7570.580 7611.161 7638.599
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/359>
GRASS GIS <http://grass.osgeo.org>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to