[GRASS5] s.univar + s.windavg + new code = s.cellstats

Eric G. Miller egm2 at jps.net
Wed Sep 18 03:29:55 EDT 2002


It came up on the other list about calculating s.univar stats
for sites in a cell.  I've been going back and forth with Gordon Keith
on the other list and privately, about a modified s.univar.

Anyway, I've got most of a version but I hit a snag when the count
for a cell is one.  Some of the stats come up NaN.  At the moment,
I've hooked in modifications so the offending stats don't divide
by zero (which was the problem).  Now, if there's just one data point,
what are appropriate values for:

  standard deviation (0.0 ?)
  skewness (0.0 ?)
  kurtosis (-3.0?)
  coefficient of variation (0.0?)

The results above are what I get when I guard for the divide by zero
cases (n = 1).  Zero seems right for most, but I don't know about
kurtosis. It has a -3.0 bias added to it at the end.  

Once I get this resolved, I just have to hook in a proper "main",
and I'll put it up for testing...

-- 
begin 664 .signature
M<F5L;&E-("Y'(&-I<D4@/G1E;BYS<&I`,FUG93P)"`@("`@("`@("`@("`@(
M"`@("`@("`@("`@("`@("`A%<FEC($<N($UI;&QE<B`\96=M,D!J<',N;F5T
"/@H`
`
end




More information about the grass-dev mailing list