[GRASS-user] Re: Calculating standard error of many maps?

Hamish hamish_b at yahoo.com
Tue Feb 10 21:06:27 EST 2009


Rainer Krug wrote:
>>>> I have 25000 maps, generated by simulation predictions, and I would
>>>> like to calculate some descriptive stats, like mean, standard
>>>> deviation, median, quartiles.

> I am trying it at the moment with 1002 maps and, apart from the fact
> that it takes some time (which I am sure it would in GRASS as well),
> it seems to be working.
> 
> I will be looking at R.series again later, when I run the simulations
> again. But I assume that there will be serious problems with 25000
> maps - I might have to do it with a sample of maps.

Hi,

for the standard stats available from r.univar
n
minimum
maximum
range
mean
mean of absolute values
standard deviation
variance
variation coefficient
sum

(ie not median, quartiles) you can use r.series in a loop, eg 1000 maps
at a time, and then sum up the resulting 25 summary maps before doing a
little math to get the overall answers. (or lots of 100 maps x250, ...)

I think you would need to add a new sum_of_squares method to r.series
to calculate variance/stdev.  see r.univar/stats.c  print_stats()

Hamish



      



More information about the grass-user mailing list