[R] Fwd: sn package - skew t - code for analytical expressions for first 4 moments
luc.hoegaerts at gmail.com
Tue Oct 14 12:01:02 CEST 2008
please note that the code at
to compute indices of skewness and kurtosis for the skew-t
distribution is not correct.
It has been kindly pointed out that i made some error in this code,
which was a bit too quickly copied from the paper.
The 'sn' package already contains a facility for computing
the cumulants, namely the function st.cumulants which
computes cumulants up to order 4.
With this function, it is immediate to compute skewness and
> cum<- st.cumulants(0,2,3,5)
> v <- cum
> skew<- cum/v^1.5
> kurt<- cum/v^2
> print(c(v, skew,kurt))
 3.424 2.127 16.256
I thank Adelchi Azzalini for pointing me out the error,
my apologies to the R list users and thanks to him.
More information about the R-help