Luc Hoegaerts
2008-Oct-14 10:01 UTC
[R] Fwd: sn package - skew t - code for analytical expressions for first 4 moments
Hello please note that the code at https://stat.ethz.ch/pipermail/r-help/2006-August/110892.html 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 kurtosis. Examples:> cum<- st.cumulants(0,2,3,5) > v <- cum[2] > skew<- cum[3]/v^1.5 > kurt<- cum[4]/v^2 > print(c(v, skew,kurt))[1] 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. luc
Apparently Analagous Threads
- sn package - skew t - code for analytical expressions for first 4 moments
- a matter of etiquette/Fw: dmvsnorm & mvst in fMultivar
- Computing skewness and kurtosis with the moments package
- moments, skewness, kurtosis
- about comparison of KURTOSIS in package: moments and fBasics