No subject


Wed Nov 14 13:37:45 EST 2007


> 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?
> 
> 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...
> 

Roger

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand at nhh.no
and: Department of Geography and Regional Development, University of
Gdansk, al. Mar. J. Pilsudskiego 46, PL-81 378 Gdynia, Poland.




More information about the grass-dev mailing list