Re: [R] skewness and kurtosis in e1071 correct?

2005-05-24 Thread Dirk Enzmann
To me your answer is opaque (but that seems to be rather a problem of language ;-) ). Perhaps my question has not been expressed clearly enough. Let me state it differently: In the R package e1071 the formulas (implicit) used are (3) and (4) (see below), the standard deviation used in these

Re: [R] skewness and kurtosis in e1071 correct? (correction)

2005-05-24 Thread Dirk Enzmann
I'm sorry, but my previous message, as often happens, some brackets were wrong: Here are the correct formulas: sd = 1/n * sum((x-mean(x))^2) # (1) sd = 1/(n-1) * sum((x-mean(x))^2) # (2) This also occured in the last paragraph. Dirk * Dr.

Re: [R] skewness and kurtosis in e1071 correct?

2005-05-24 Thread Dirk Enzmann
My last question to the R list is another example of asking too fast before reading (sorry). But by the way and because it might be interesting for others, an answer can be found in: Joanes, D. N. Gill, C. A. (1998) Comparing measures of sample skewness and kurtosis. Journal of the Royal

Re: [R] skewness and kurtosis in e1071 correct?

2005-05-23 Thread Campbell
This is probably an issue over definitions rather than the correct answer. To me skewness and kurtosis are functions of the distribution rather than the population, they are equivalent to expectation rather than mean. For the normal distribution it makes no sense to estimate them as the

[R] skewness and kurtosis in e1071 correct?

2005-05-22 Thread Dirk Enzmann
I wonder whether the functions for skewness and kurtosis in the e1071 package are based on correct formulas. The functions in the package e1071 are: # skewness - function (x, na.rm = FALSE) { if (na.rm) x - x[!is.na(x)] sum((x -

[R] Skewness and Kurtosis

2004-10-27 Thread Vito Ricci
Hi, in which R-package I could find skewness and kurtosis measures for a distribution? I built some functions: gamma1-function(x) { m=mean(x) n=length(x) s=sqrt(var(x)) m3=sum((x-m)^3)/n g1=m3/(s^3) return(g1) } skewness-function(x) { m=mean(x) me=median(x) s=sqrt(var(x)) sk=(m-me)/s

Re: [R] Skewness and Kurtosis

2004-10-27 Thread Uwe Ligges
Vito Ricci wrote: Hi, in which R-package I could find skewness and kurtosis measures for a distribution? Both funcions are in package e1071. Uwe Ligges I built some functions: gamma1-function(x) { m=mean(x) n=length(x) s=sqrt(var(x)) m3=sum((x-m)^3)/n g1=m3/(s^3) return(g1) } skewness-function(x)

Re: [R] Skewness and Kurtosis

2004-10-27 Thread Diethelm Wuertz
Hello, fBasics has functions for skewness and kurtosis: Comments on these functions are welcome! Diethelm Wuertz # ** kurtosis = function (x, ...) { # A function implemented by D. Wuertz # FUNCTION: UseMethod(kurtosis) } #