[R] Skewness test

Dirk Eddelbuettel edd at debian.org
Mon Jan 17 21:24:11 CET 2005


On Mon, Jan 17, 2005 at 07:59:32PM +0100, Christian Hennig wrote:
> Hi,
> 
> is there a test for the H0 skewness=0 (or with skewness as test
> statistic and normality as H0) implemented in R?

Not that I know of, but tseries has the standard Jarque-Bera test that
combines 3rd and 4th moment tests into a chisq(2) as on omnibus test for
normality.  Cutting and pasting from the code in tseries/R/test.R, one could
probably take that apart and just use 

    m1 <- sum(x)/n
    m2 <- sum((x-m1)^2)/n
    m3 <- sum((x-m1)^3)/n
    m4 <- sum((x-m1)^4)/n
    b1 <- (m3/m2^(3/2))^2

    STATISTICS <-  n * 1/6 * b1
    
as a chisq(1).  But I have no idea what the power of that test would be.  

Hth, Dirk

-- 
Better to have an approximate answer to the right question than a precise 
answer to the wrong question.  --  John Tukey as quoted by John Chambers




More information about the R-help mailing list