[GRASS-dev] [GRASS GIS] #2376: Add p-value for regression slope in r series
GRASS GIS
trac at osgeo.org
Wed Jul 30 10:00:46 PDT 2014
#2376: Add p-value for regression slope in r series
------------------------------------------+---------------------------------
Reporter: mastho | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: Raster | Version: svn-releasebranch70
Keywords: r.series, p-value regression | Platform: Unspecified
Cpu: Unspecified |
------------------------------------------+---------------------------------
Changes (by pvanbosgeo):
* cc: pvanbosgeo (added)
Comment:
You can calculate the p-value using the scipy library (from
http://stackoverflow.com/questions/17559897/python-p-value-
from-t-statistic). For example, if tt is the t value
{{{
import scipy.stats as stats
import numpy as np
tt = 2.4
n = 10
pval = stats.t.sf(np.abs(tt), n-1)*2 (two-sided p-value)
}}}
Perhaps this can be used either to create a script or in r.series?
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2376#comment:2>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list