[R] Skewness and Kurtosis

Vito Ricci vito_ricci at yahoo.com
Wed Oct 27 10:19:53 CEST 2004


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
return(sk)
}

bowley<-function(x)
{
q<-as.vector(quantile(x,prob=c(.25,.50,.75)))
b=(q[3]+q[1]-2*q[2])/(q[3]-q[2])
return(b)
}

b3<-function(x)
{
m=mean(x)
me=median(x)
n=length(x)
d=sum(abs(x-me))/n
b=(m-me)/d
return(b)
}

but I'm looking for some already included in a
package.

Thanks in advance.
Best
Vito


=====
Diventare costruttori di soluzioni

"The business of the statistician is to catalyze 
the scientific learning process."  
George E. P. Box


Visitate il portale http://www.modugno.it/
e in particolare la sezione su Palese http://www.modugno.it/archivio/cat_palese.shtml




More information about the R-help mailing list