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

Rainer M Krug r.m.krug at gmail.com
Wed Feb 11 02:10:53 EST 2009


On Wed, Feb 11, 2009 at 4:06 AM, Hamish <hamish_b at yahoo.com> wrote:
>
> 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()

Thanks a lot Hamish - I will look into that and see what can do. In
the meantime, it works in R, as described above.

Cheers

Rainer

>
> Hamish
>
>
>
>
>
>



-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Faculty of Science
Natural Sciences Building
Private Bag X1
University of Stellenbosch
Matieland 7602
South Africa


More information about the grass-user mailing list