I want to use skewness of circular data using circ_skewness code in MATLAB. I know there are two methods for this:
- Pewsey, Metrika, 2004
- Statistical analysis of circular data, Fisher, p. 34
However, it seems the results are very different from each other. For instance, when I test for a Von Mises distribution (which should have a skewness of 0), the first method returns a skewness of zero while the second method returns a skewness of the order of thousands. What is causing this problem?
Here is an example of what I do: I generate a Von Mises distribution with mean 1 and kappa 10 with size 10 (values are in radians):
b=[0.8149 0.8456 0.3600 0.6513 0.9229 1.3470 0.5658 1.3099 1.1366 0.6194]
I try to find its skewness:
Based on the code , b is the skewnss using Pewsey method and b0 is the skewness using Fisher method. These are the results:
b=-0.0061
b0=-78.8672
Why do we have this difference?
R
code implementing the NCSS formulas:cmoment <- function(a, k=1) { c.k <- mean(cos(k * a)); s.k <- mean(sin(k * a)); r.k <- sqrt(c.k^2 + s.k^2); t.k <- (atan2(s.k, c.k) + 2*pi) %% (2*pi); c(c=c.k, s=s.k, r=r.k, t=t.k) }; cskew <- function(a) { m.1 <- cmoment(a, 1); m.2 <- cmoment(a, 2); m.2["r"] * sin(m.2["t"] - 2*m.1["t"]) / (1 - m.1["r"])^(3/2) }
As an example of its use, here is a Monte-Carlo simulation:s <- replicate(1e2, cskew(rnorm(1e2, sd=1/2) %% (2*pi))); hist(s)
$\endgroup$