R/circ_kurtosis.R

Defines functions circ_kurtosis

  #kurtosis
  circ_kurtosis <- function(theta){
    
    n<-length(theta)
    C1 <- sum(cos(theta))
    S1 <- sum(sin(theta))
    R.bar <- sqrt((C1/n)^2+(S1/n)^2)
    theta.bar <- atan2(C1, S1)
    rho2 <- sum(cos(2*(theta-theta.bar)))/n
    C2 <- sum(cos(2*theta))/n
    S2 <- sum(sin(2*theta))/n
    mu2 <- atan2(C2, S2)
    kt <- (rho2*cos(mu2-2*theta.bar)-R.bar^4)/(1-R.bar)^2
    kt
    
  }
  
Gi-Seop/ODA documentation built on Jan. 6, 2020, 12:49 p.m.