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

Helena Mitasova hmitaso at unity.ncsu.edu
Wed Sep 18 08:24:00 EDT 2002


Eric,

zero may be very misleading, so the program should give clear warning that
there are cells
with count one and the zeroes in the output can actually mean NaN. There is no
point
to spend too much time on this as the sites should be moved to the new
vector format as soon as it is stable enough (Radim, please keep us posted).

Helena
where NaN is supported.

"Eric G. Miller" wrote:

> On Wed, Sep 18, 2002 at 09:49:37AM +0200, Roger Bivand wrote:
> > On Wed, 18 Sep 2002, Eric G. Miller wrote:
> >
> > > 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?)
> >
> > >From R
> >
> > > x <- 2
> > > mean(x)
> > [1] 2
> > > sd(x)
> > [1] NA
> > > library(e1071)
> > > kurtosis(x)
> > [1] NA
> > > skewness(x)
> > [1] NA
> >
> > where NA is not available, here not defined. Zero is wrong by definition,
> > but Inf is a possibility - at least for variance or standard deviation. Do
> > we have a general NULL that could be used?
>
> There isn't a way to store NULL in sites files (NaN would be approriate,
> but the library doesn't support it).  Maybe zero will have to do.  A
> sample size of one is about as useful as an anecdote anyway... ;-)
>
> --
> 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
>
> _______________________________________________
> grass5 mailing list
> grass5 at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5




More information about the grass-dev mailing list