[GRASS-user] Calculate p value for regression slope in r.series
Paulo van Breugel
p.vanbreugel at gmail.com
Fri Nov 9 09:20:28 PST 2012
Great, thanks
On Fri, Nov 9, 2012 at 12:28 PM, Glynn Clements <glynn at gclements.plus.com>wrote:
>
> Markus Metz wrote:
>
> > >> Just wondering, if it is implemented in r.regression.series, would it
> be
> > >> very difficult to port to r.series? Or do the two things function
> different
> > >> internally?
> > >
> > > It could probably be added to r.series quite quickly if someone was
> > > willing to provide definitions for "t-value" and "p-value".
> >
> > The t-value of a simple linear regression can be calculate with
> >
> > t = sqrt(Rsq) * sqrt((n - 2) / (1 - Rsq));
> >
> > Rsq = R squared or coefficient of determination (r.series
> method=detcoeff)
> > n = sample size
>
> In which case, it can be calculated with e.g.
>
> r.series ... output=tmp.rsq,tmp.n method=detcoeff,count
> r.mapcalc 'outmap = sqrt(tmp.rsq * (tmp.n - 2) / (1 - tmp.rsq))'
>
> I've added method=tvalue in r53742.
>
> --
> Glynn Clements <glynn at gclements.plus.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20121109/31245d19/attachment.html>
More information about the grass-user
mailing list