[GRASS-dev] [GRASS GIS] #1668: r.regression.line F-test incorrect

GRASS GIS trac at osgeo.org
Thu May 31 06:08:14 PDT 2012


#1668: r.regression.line F-test incorrect
-------------------------+--------------------------------------------------
 Reporter:  cmbarton     |       Owner:  grass-dev@…              
     Type:  defect       |      Status:  new                      
 Priority:  normal       |   Milestone:  7.0.0                    
Component:  Raster       |     Version:  unspecified              
 Keywords:               |    Platform:  Unspecified              
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------

Comment(by mlennert):

 Replying to [comment:4 mmetz]:
 > You can compare to the grass7 addon r.regression.multi whose results are
 identical to those of R.

 This is what I did and actually r.regression.line with the above change
 gives the same result as R, not r.regression.multi (regressing the landsat
 bands 10 and 20 from the NC data set):

 F (R): 6268922
 F (r.regression.line with change): 6268922.212939
 F (r.regression.multi): 6268947.256273

 I think I've found the problem in r.regression.multi:

 Instead of

 {{{
 F = ((SStot - SSerr) * (count - n_predictors)) / (SSerr * n_predictors);
 }}}


 it should be


 {{{
 F = ((SStot - SSerr) * (count - n_predictors - 1)) / (SSerr *
 n_predictors);
 }}}


 Moritz

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/1668#comment:5>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list